{"version":3,"sources":["static/assets/friskis-logo--white.svg","static/assets/start_sida.jpg","static/assets/icon-startpage-calender.svg","static/assets/icon-startpage-notifications.svg","static/assets/icon-startpage-statistics.svg","static/assets/icon-startpage-facilities.svg","static/assets/icon-online-training.svg","static/assets/icon-startpage-news.svg","static/assets/icon-startpage-membership.svg","static/assets/tanka_traening.png","static/assets/icon-checkmark--black.svg","static/assets/bgbild.jpg","static/assets/converted-to-components/icon-calender.svg","static/assets/background-login.jpg","store/pushNotificationSettings/pushNotificationSettingsActions.ts","store/news/newsActions.ts","store/pushNotificationSettings/pushNotificationSettingsReducer.ts","store/global/errors/errorsActions.ts","store/news/newsReducer.ts","store/auth/read/authReadActions.ts","store/global/errors/errorsReducer.ts","websd/utils/configureApi.ts","store/auth/loginCmd/loginCmdActions.ts","store/auth/read/authReadReducer.ts","store/auth/loginCmd/loginCmdReducer.ts","utils/validators.ts","websd/utils/cookie.ts","utils/localStorage.ts","utils/auth.ts","utils/currency.ts","store/global/dictionary/dictionary.ts","websd/utils/sort.ts","websd/utils/lockBackgroundScroll.ts","models/SitecoreDictionary.ts","models/BokningStatus.ts","models/ProductPaymentMethods.ts","models/NotificationSettings.ts","models/PersonLookup.ts","store/basket/basketActions.ts","store/global/session/sessionModels.ts","store/global/session/sessionActions.ts","store/global/session/sessionReducer.ts","store/global/fetch/fetchModels.ts","store/global/fetch/fetchActions.ts","store/shop/shopModels.ts","store/shop/shopActions.ts","store/global/fetch/fetchReducer.ts","store/global/fetch/fetchSelectors.ts","store/shop/shopThunks.ts","store/shop/shopDispatches.ts","store/shop/shopReducer.ts","utils/purchaseErrorMessages.ts","utils/queryParameter.ts","utils/events.ts","utils/foerening.ts","utils/filter.ts","utils/taxonomy.ts","utils/helpers.ts","utils/pass.ts","store/global/ui/foereningSwitcher/foereningSwitcherActions.ts","utils/products.ts","store/auth/loginCmd/loginCmdThunks.ts","store/auth/authReducer.ts","store/pass/read/passActions.ts","utils/sitecoreIntegration.ts","store/pass-details/read/passDetailsReadActions.ts","store/bokningar/bokningarAction.ts","store/pass/read/passReadReducer.ts","store/global/ui/schedule/uiScheduleActions.ts","store/bokningar/bokningarReducer.ts","store/pass/passReducer.ts","store/pass-details/read/passDetailsReadReducer.ts","models/app/MobileOSType.ts","store/bokningar/bokningarThunks.ts","store/location/locationActions.ts","store/global/ui/sitecore/sitecoreActions.ts","store/location/locationThunks.ts","store/location/routesMap.ts","store/global/calendar/calendarModels.ts","store/global/calendar/calendarActions.ts","store/global/dictionary/dictionaryModels.ts","store/global/dictionary/dictionaryActions.ts","store/global/calendar/calendarReducer.ts","store/global/calendar/calendarThunks.ts","store/global/dictionary/dictionaryThunks.ts","store/global/dictionary/dictionaryReducer.ts","store/passFilter/passFilterActions.ts","store/passFilter/passFilterReducer.ts","store/payment/read/paymentReadActions.ts","store/passFilter/passFilterDispatches.ts","store/passFilter/passFilterThunks.ts","store/pass/passThunks.ts","store/basket/basketReducer.ts","store/basket/models.ts","store/user/read/userReadActions.ts","store/payment/read/paymentReadReducer.ts","store/basket/basketThunks.ts","store/user/updateUserProfileCmd/updateUserProfileCmdActions.ts","store/user/read/userReadReducer.ts","store/user/createUserCmd/createUserActions.ts","store/user/updateUserProfileCmd/updateUserProfileCmdReducer.ts","store/user/updateUserProfileCmd/updateUserProfileCmdThunks.ts","store/user/changePasswordCmd/changePasswordActions.ts","store/user/createUserCmd/createUserReducer.ts","store/user/updateAutogiroCmd/updateAutogiroActions.ts","store/user/changePasswordCmd/changePasswordReducer.ts","store/user/userModels.ts","store/user/updateAutogiroCmd/updateAutogiroReducer.ts","store/user/updateAutogiroCmd/updateAutogiroThunks.ts","store/user/userReducer.ts","store/user/thunks.ts","store/news/newsThunks.ts","store/global/ui/language/languageActions.ts","store/global/ui/language/languageReducer.ts","store/global/debug/debugActions.ts","store/global/ui/language/languageThunks.ts","components/shop/Order/Order.tsx","store/auth/authThunks.ts","api.ts","store/global/errors/errorsThunks.ts","store/global/ui/bookingRules/bookingRulesActions.ts","store/global/ui/schedule/uiScheduleReducer.ts","store/global/ui/bookingRules/bookingRulesReducer.ts","store/global/ui/foereningSwitcher/foereningSwitcherReducer.ts","store/global/ui/sitecore/sitecoreReducer.ts","store/global/ui/schedule-filter/uiScheduleFilterActions.ts","store/global/ui/schedule/uiScheduleThunks.ts","store/global/ui/schedule-filter/uiScheduleFilterReducer.ts","store/global/ui/main-menu/mainMenuModels.ts","store/global/ui/main-menu/mainMenuReducer.ts","store/global/ui/main-menu/mainMenuActions.ts","store/global/ui/header/headerActions.ts","store/global/ui/main-menu/mainMenuThunks.ts","store/global/ui/header/headerReducer.ts","store/global/ui/side-bar/sideBarReducer.ts","store/global/ui/siteswitcher/siteswitcherReducer.ts","store/global/ui/side-bar/sideBarThunks.ts","store/global/ui/side-bar/sideBarActions.ts","store/global/ui/application-mode/applicationModeReducer.ts","store/global/ui/settings/profile/uiSettingsProfileModels.ts","store/global/ui/settings/profile/uiSettingsProfileActions.ts","store/global/ui/bookings/uiBookingsActions.ts","store/global/ui/settings/profile/uiSettingsProfileReducer.ts","store/global/ui/bookings/uiBookingsReducer.ts","store/global/ui/anlaeggningar/anlaeggningarAction.ts","store/global/ui/shop-filter/uiShopFilterActions.ts","store/global/ui/anlaeggningar/anlaeggningarReducer.ts","store/global/ui/shop-filter/uiShopFilterReducer.ts","store/global/ui/image/imageActions.ts","store/global/ui/newNotification/newNotificationActions.ts","store/global/ui/image/imageReducer.ts","store/global/ui/image/imageThunks.ts","store/global/passwordReset/passwordResetModels.ts","store/global/ui/newNotification/newNotificationReducer.ts","store/global/ui/newNotification/newNotificationThunks.ts","store/global/ui/uiReducer.ts","store/global/passwordReset/passwordResetActions.ts","store/global/pushNotifications/registerDeviceCmd/registerDeviceCmdModels.ts","store/global/passwordReset/passwordResetReducer.ts","store/global/pushNotifications/registerDeviceCmd/registerDeviceCmdThunks.ts","store/global/pushNotifications/registerDeviceCmd/registerDeviceCmdReducer.ts","store/initialize/initializeActions.ts","store/global/pushNotifications/pushNotificationsReducer.ts","store/global/globalReducer.ts","store/global/debug/debugReducer.ts","store/initialize/initializeReducer.ts","store/anlaeggningar/read/anlaeggningarReadActions.ts","store/anlaeggningar/read/anlaeggningarReadReducer.ts","store/foereningar/read/foereningarReadActions.ts","store/anlaeggningar/anlaeggningarReducer.ts","store/anlaeggningar/anlaeggningarThunks.ts","store/pass-details/passDetailsReducer.ts","store/trainingpreferences/read/trainingPreferencesReadActions.ts","store/foereningar/read/foereningarReadReducer.ts","store/foereningar/foereningarReducer.ts","store/foereningar/foereningarThunks.ts","store/trainingpreferences/write/trainingPreferencesWriteActions.ts","store/trainingpreferences/read/trainingPreferencesReadReducer.ts","store/medlemskapOchKort/read/medlemskapOchKortReadActions.ts","store/trainingpreferences/write/trainingPreferencesWriteReducer.ts","store/trainingpreferences/trainingPreferencesReducer.ts","store/trainingpreferences/thunks.ts","store/medlemskapOchKort/write/medlemskapOchKortWriteActions.ts","store/payment/paymentModels.ts","store/medlemskapOchKort/read/medlemskapOchKortReadReducer.ts","store/medlemskapOchKort/medlemskapOchKortReducer.ts","store/payment/paymentThunks.ts","store/statistics/read/statisticsReadActions.ts","store/payment/paymentReducers.ts","store/notifications/notificationsActions.ts","store/statistics/read/statisticsReadReducer.ts","store/statistics/statisticsReducer.ts","components/icons/IconCross.tsx","store/notifications/notificationsReducer.ts","store/notifications/notificationsThunks.ts","configureStore.ts","components/app/Environment.tsx","components/app/Bluescreen.tsx","components/app/ErrorBubble.tsx","components/app/Errors.tsx","components/icons/IconArrow.tsx","components/icons/IconBigClose.tsx","components/icons/IconCalendar.tsx","components/icons/IconChevron.tsx","components/icons/IconFilterCalendarView.tsx","components/icons/IconDrop.tsx","components/icons/IconFilterListView.tsx","components/icons/IconHeart.tsx","components/icons/IconMyAccount.tsx","components/icons/IconInformation.tsx","components/icons/IconMenuArrow.tsx","components/icons/IconMenuBookedSessions.tsx","components/icons/IconMenuCalendar.tsx","components/icons/IconMenuFacility.tsx","components/icons/IconMenuFriskis.tsx","components/icons/IconMenuMembership.tsx","components/icons/IconMenuInstallningar.tsx","components/icons/IconMenuNews.tsx","components/icons/IconMenuNotifications.tsx","components/icons/IconMenuSettings.tsx","components/icons/IconMenuStatistics.tsx","components/icons/IconMenuSwitch.tsx","components/icons/IconMessage.tsx","components/icons/IconProfile.tsx","components/icons/IconMyWorkout.tsx","components/icons/IconRemove.tsx","components/icons/IconPlay.tsx","components/icons/IconPlus.tsx","components/icons/IconMenuCalendarSync.tsx","components/icons/IconPen.tsx","components/icons/IconCheckMark.tsx","components/icons/IconKvitto.tsx","components/icons/IconBookingStatus.tsx","components/settings/Settings.tsx","components/icons/IconRoundButtonCheckmark.tsx","components/icons/IconOnlineWorkout.tsx","components/common/Spinner.tsx","components/common/TextBox.tsx","components/common/booking/PassBookerContainer.tsx","components/pass-details/model.ts","components/common/booking/PassBooker.tsx","components/common/SelectInput.tsx","components/common/DayPicker.tsx","components/common/EmailInput.tsx","components/common/MainInput.tsx","components/common/Checkbox.tsx","components/common/MainButton.tsx","components/common/Banner.tsx","components/common/StatusBar.tsx","components/common/ConfirmationTextBox.tsx","components/common/SmallHeader.tsx","components/common/IconButton.tsx","components/common/Logotyp.tsx","components/common/bow/Bow.tsx","components/common/booking-item/BookingItem.tsx","components/common/booking-item/BookingItemContainer.ts","components/common/Overlay.tsx","components/common/ShoppingBasketButton.tsx","components/common/NewPassword.tsx","components/common/PopOver.tsx","components/common/AutogiroInput.tsx","components/shoppingBasket/forms/PopupGDPR.tsx","components/settings/profile/Profile.tsx","components/settings/profile/ProfileContainer.ts","components/start/nextBokning/nextBokningTitle/nextBokningTitle.tsx","components/start/nextBokning/noBookedPass/noBookedPass.tsx","utils/math.ts","components/start/nextBokning/bookedPass/bookedPass.tsx","components/start/nextBokning/nextBokning.tsx","components/start/mobileLinks/mobileLinks.tsx","components/common/pass-list-skeleton/PassItemSkeleton.tsx","components/common/pass-list-skeleton/PassListSkeleton.tsx","components/start/startPageDesktopBanner/StartPageDesktopBanner.tsx","components/start/desktopLinks/DesktopLinks.tsx","components/news/NewsItem.tsx","components/news/News.tsx","components/news/NewsContainer.ts","components/start/Start.tsx","components/start/StartContainer.tsx","components/app/FancyNavLink.tsx","components/foereningarList/FoereningarList.tsx","components/foereningarList/FoereningarListContainer.tsx","components/login/Login.tsx","components/login/LoginContainer.tsx","components/adminLogin/AdminLogin.tsx","components/adminLogin/AdminLoginContainer.tsx","components/app/NotFound.tsx","components/app/NotFoundContainer.ts","components/request-password-reset/RequestPasswordReset.tsx","components/request-password-reset/RequestPasswordResetContainer.tsx","store/global/passwordReset/passwordResetThunks.ts","components/settings/SettingsLinks.tsx","components/settings/settingsPageHeader/settingsPageHeader.tsx","components/settings/paymentSettings/autogiroSettings/AutogiroSettings.tsx","components/settings/paymentSettings/autogiroSettings/AutogiroSettingsContainer.ts","components/settings/paymentSettings/PaymentSettingsItem.tsx","components/settings/paymentSettings/Autogiros.tsx","components/settings/paymentSettings/Avtalegiros.tsx","components/settings/paymentSettings/Cards.tsx","components/settings/paymentSettings/PaymentSettings.tsx","components/settings/paymentSettings/PaymentSettingsContainer.ts","components/settings/userAccount/userAccount.tsx","components/settings/userAccount/userAccountContainer.tsx","store/user/changePasswordCmd/changePasswordThunk.ts","store/pushNotificationSettings/pushNotificationSettingsThunks.ts","components/Switch/Switch.tsx","components/settings/notification-settings/ListItem.tsx","components/settings/notification-settings/NotificationSettings.tsx","components/settings/notification-settings/NotificationSettingsContainer.ts","components/settings/trainingpreferences/PreferenceItem.tsx","components/settings/trainingpreferences/AnlaeggningarList.tsx","components/settings/trainingpreferences/ItemDropdownList.tsx","components/settings/trainingpreferences/PreferenceList.tsx","components/settings/trainingpreferences/AnvaendarePreferenceList.tsx","components/settings/trainingpreferences/TrainingPreferences.tsx","components/settings/trainingpreferences/TrainingPreferencesContainer.ts","components/settings/calendarSync/CalendarSyncContainer.ts","components/settings/calendarSync/CalendarSync.tsx","components/settings/SettingsBanner.tsx","components/settings/SettingsContainer.ts","components/subscriptionsAndCards/TrainingCard/TrainingCard.tsx","components/subscriptionsAndCards/TrainingCard/TrainingCardContainer.tsx","store/medlemskapOchKort/medlemskapOchKortThunks.ts","components/subscriptionsAndCards/Subscription.tsx","components/subscriptionsAndCards/SubscriptionReceipt.tsx","components/subscriptionsAndCards/SubscriptionsAndCardsContainer.ts","components/subscriptionsAndCards/SubscriptionsAndCards.tsx","components/pass-details/DetailsBlockDesktop.tsx","components/media/Header.tsx","components/media/Tickers.tsx","components/media/YouTubeVideo.tsx","components/media/HeroImage.tsx","components/pass-details/PassDetailsHeroBanner.tsx","components/text/ShortList.tsx","store/schedule/scheduleModels.ts","components/text/Summary.tsx","components/pass-details/Slots.tsx","components/pass-details/Info.tsx","components/bookingRules/BookingRules.tsx","components/bookingRules/BookingRulesContainer.tsx","components/pass-details/PassDetailsInfoBlock.tsx","components/pass-details/DetailsBlockMobile.tsx","components/pass-details/PassDetailsContent.tsx","components/pass-details/pass-details-skeletons/PassDetailsHeroBannerSkeleton.tsx","components/pass-details/pass-details-skeletons/PassDetailsSkeleton.tsx","components/pass-details/PassDetailsFailedFetch.tsx","store/pass-details/passDetailsThunks.ts","components/pass-details/PassDetailsContainer.ts","components/pass-details/PassDetails.tsx","components/shoppingBasket/shoppingBasketProduct.tsx","components/shoppingBasket/shoppingBasketCoupon.tsx","components/shoppingBasket/shoppingBasketTotalPrice.tsx","components/shoppingBasket/shoppingBasketProducts/shoppingBasketProductsList.tsx","components/shoppingBasket/shoppingBasketProducts/shoppingBasketProductsListContainer.tsx","components/shoppingBasket/forms/formContainer.tsx","components/shoppingBasket/forms/medlemsVillkor/MedlemsVillkor.tsx","components/shoppingBasket/forms/medlemsVillkor/MedlemsVillkorContainer.tsx","components/shoppingBasket/forms/TermsCheckbox.tsx","components/shoppingBasket/forms/PaymentPurchaseFailMessage.tsx","components/shoppingBasket/forms/smsEmailVillkor/SmsEmailVillkor.tsx","components/shoppingBasket/forms/TermsCheckboxGDPR.tsx","components/shoppingBasket/forms/smsEmailVillkor/SmsEmailVillkorContainer.tsx","components/shoppingBasket/forms/TermsCheckboxSmsEmail.tsx","components/shoppingBasket/forms/knownUserBuying/KnownUserBuyingForm.tsx","components/shoppingBasket/forms/knownUserBuying/KnownUserBuyingFormContainer.tsx","components/shoppingBasket/shoppingBasket.tsx","components/shoppingBasket/shoppingBasketContainer.tsx","components/facilities/FacilityExceptionalOpenTimes.tsx","components/facilities/FacilityExceptionalOpenTimesIndicator.tsx","components/facilities/FacilitiesItem.tsx","components/facilities/Facilities.tsx","components/facilities/FacilitiesContainer.ts","components/common/shopFilter/filter-category/category-item/ShopFilterCategoryItem.tsx","components/common/shopFilter/filter-category/ShopFilterCategory.tsx","components/shop/Tabs/Tabs.tsx","components/common/shopFilter/filter-category/ShopFilterCategoryContainer.tsx","components/common/shopFilter/ShopFilter.tsx","components/header/HeaderContent/BackButton.tsx","components/common/shopFilter/ShopFilterContainer.ts","components/shop/CategorySlider/CategorySlider.tsx","components/shop/Products/ProductGroup/Product/Product.tsx","components/shop/Products/ProductGroup/ProductGroup.tsx","components/shop/Products/Products.tsx","components/shop/ShopContainer.ts","components/notifications/Notification.tsx","components/shop/Shop.tsx","components/common/gray-label/GrayLabel.tsx","components/shop/ProductMobileHeader.tsx","components/shop/Product.tsx","components/shop/ShopAssociationSelectorView.tsx","components/shop/ShopAssociationSelectorViewContainer.ts","components/shop/Signatures/Signature.tsx","components/shop/Signatures/SignatureContainer.ts","components/shop/ShopNotAvailableForFoerening.tsx","components/shop/ShopWrapperContainer.tsx","components/shop/ShopWrapper.tsx","components/payment/Payment.tsx","components/payment/PaymentContainer.ts","components/receipt/ReceiptContainer.ts","components/receipt/Receipt.tsx","components/bookings/booking-list/day/BookingDayItem.tsx","components/bookings/booking-list/BookingList.tsx","components/bookings/Bookings.tsx","components/bookings/BookingsContainer.ts","components/notifications/Notifications.tsx","components/notifications/NotificationsContainer.ts","components/statistics/SideBySideStatistics/SideBySideStatistics.tsx","components/statistics/ListOfStatistics/ListOfStatistics.tsx","components/statistics/statistics.tsx","components/statistics/statisticsContainer.ts","store/statistics/statisticsThunks.ts","components/reset-password/ResetPassword.tsx","components/reset-password/ResetPasswordContainer.tsx","components/publicSchedulePopup/BokningStatusPopup.tsx","components/publicSchedulePopup/BokningStatusPopupContainer.ts","components/publicSchedulePopup/PublicSchedulePopup.tsx","components/publicSchedulePopup/PublicSchedulePopupContainer.ts","components/common/ScheduleLauncher/ScheduleLauncherContainer.tsx","components/common/ScheduleLauncher/ScheduleLauncher.tsx","components/schedule/schedule/pass-item/PassItemContainer.tsx","components/schedule/schedule/pass-item/PassItem.tsx","components/schedule/schedule-mode-switcher/ScheduleModeSwitcher.tsx","components/schedule/schedule-mode-switcher/ScheduleModeSwitcherContainer.tsx","components/common/passFilter/overlay/PassFilterOverlayMessage.tsx","components/common/passFilter/overlay/PassFilterOverlayMessageContainer.tsx","components/common/passFilter/PassFilterContainer.tsx","components/common/passFilter/PassFilter.tsx","components/schedule/schedule/ScheduleContainer.ts","components/schedule/schedule/Schedule.tsx","components/schedule/schedule/PassHeader.tsx","components/schedulePage/schedulePageContainer.ts","components/schedulePage/schedulePage.tsx","components/shop/Products/product-details/ProductDetails.tsx","components/shop/Products/product-details/ProductDetailsContainer.tsx","components/shoppingBasket/forms/newUserForm/AccountForm.tsx","components/shoppingBasket/forms/newUserForm/MemberProfileForm.tsx","components/shoppingBasket/forms/newUserForm/NewUserForm.tsx","components/shoppingBasket/forms/newUserForm/NewUserFormContainer.tsx","store/global/ui/anlaeggningar/anlaeggningarThunks.ts","components/app/SwitchPage.tsx","components/header/HeaderContent/MobileHeaderContent.tsx","components/main-menu/main-menu-list/MainMenuListItem.tsx","components/main-menu/main-menu-list/MainMenuListAccount.tsx","components/main-menu/main-menu-list/FoereningSwitcherItem.tsx","components/icons/IconFriskisGo.tsx","components/main-menu/main-menu-list/MainMenuListWorkout.tsx","components/main-menu/main-menu-list/MainMenuListWorkoutContainer.tsx","components/main-menu/main-menu-list/MainMenuListSwitcher.tsx","components/main-menu/MainMenu.tsx","components/main-menu/MainMenuContainer.tsx","components/header/HeaderContent/HeaderTitle.tsx","components/header/HeaderContent/DesktopHeaderContent.tsx","components/login/LoginPrompt.tsx","components/header/HeaderContent/HeaderContent.tsx","components/header/HeaderContent/HeaderContentContainer.tsx","components/header/Header.tsx","components/header/HeaderContainer.tsx","components/side-bar/SideBar.tsx","components/side-bar/SideBarContainer.tsx","components/calendarSyncPopup/CalendarSyncPopup.tsx","components/calendarSyncPopup/CalendarSyncPopupContainer.ts","components/acceptBookingRulesPopup/AcceptBookingRulesPopup.tsx","components/acceptBookingRulesPopup/AcceptBookingRulesPopupContainer.ts","store/user/updateBookingRuleForActiveFoereningCmd/updateBookingRuleForActiveFoereningThunks.ts","components/app/FoereningSwitcher.tsx","components/SiteSwitcher/SiteSwitcher.tsx","components/SiteSwitcher/SiteSwitcherContainer.tsx","components/SiteSwitcher/SiteSwitcherLogin.tsx","components/app/App.tsx","store/initialize/initializeThunks.ts","components/app/AppContainer.tsx","index.tsx","store/rootReducer.ts","static/assets/friskis-logo--red.svg","static/assets/converted-to-components/icon-big-close.svg","static/assets/Filter.svg"],"names":["module","exports","PushNotificationsActionType","NewsActionType","getPushNotificationSettings","settings","type","GetPushNotificationSettings","initalState","PushNotificationSettingsReducer","state","action","ActionType","initialstate","news","NewsReducer","GetNews","AuthReadActionType","addError","error","AddError","initialState","errors","appCrashed","adminError","getAllErrors","getHasAppCrashed","errorIdCounter","globalHeaders","nextErrorId","isApiErrorResponse","errorObject","Felkod","Felmeddelande","getApiErrorMessage","ValidationErrors","map","v","UserMessage","join","rejectTextAsErrorMessage","text","method","endpoint","status","statusText","errorCode","id","message","http","toUpperCase","response","callApi","process","REACT_APP_X_USERNAME","rootEndpoint","options","isAnonymous","fetch","credentials","then","json","JSON","parse","err","safeJsonParse","ok","Promise","reject","headers","get","rejectJsonAsErrorMessage","texterr","_fetcherror","apiCall","configureOptions","init","apiRootEndpoint","anonymousCall","result","muteErrorNotification","muteErrorNotificationOnStatus","indexOf","errorActionCreator","unauthorizedAction","catch","setTimeout","registerGlobalHeader","headerKey","headerValue","overwrite","Error","removeGlobalHeader","LoginCmdActionTypes","setAuthToken","token","giltighetstid","GetAuth","clearAuthToken","ClearAuth","email","password","foereningId","updateEmail","UPDATE_EMAIL","updateFoereningId","UPDATE_FOERENINGID","updatePassword","UPDATE_PASSWORD","clearLoginCmd","CLEAR_CMD","isValidEmail","value","RegExp","test","isAccountNumberValid","isNaN","Number","isClearingNumberValid","getCookie","name","nameLenPlus","length","document","cookie","split","c","trim","filter","substring","decodeURIComponent","deleteCookie","path","domain","addCookie","content","expirationDate","toUTCString","isLocalStorageAvailable","Storage","addAsCookie","key","item","hasACookieWithSameName","undefined","getItem","useCookiesIfNotPossible","window","localStorage","isExpired","mExpirationDate","moment","isBefore","ExpirationDate","isValid","toDate","removeItem","saveItem","currentItem","setItem","stringify","setDate","getDate","saveItemInSession","sessionStorage","getItemFromSession","removeItemFromSession","clear","cookies","i","eqPos","substr","clearCookies","readToken","storedAuth","hasAValidAuthToken","authToken","Giltighetstid","Token","isAfter","clearSavedAuth","arr","order","push","getCurrencyCode","currency","getTranslate","localeState","getActiveLanguage","translate","defaultLanguage","store","getState","global","ui","language","code","languages","active","translations","getDateTextForView","startTime","format","mDate","day","dayMonth","upperDay","replace","formatDate","date","SortIntoDays","items","uniqueDaysArray","forEach","isActive","expanded","isExpandable","Date","StartTime","rawDate","some","r","getListOfUniqueDays","index","matchingDay","find","SortSortedIntoDaysViewObject","dayViewObject","body","getElementsByTagName","html","unlock","lastKnownState","style","position","height","width","overflow","scrollPosition","scrollTo","scroll","lockBackgroundScroll","component","doc","documentElement","top","pageYOffset","scrollTop","clientTop","lock","generateUnlockFunction","componentWillUnmount","willUnmount","BokningsStatusEnum","ProductPaymentMethod","PaymentMethodType","Bookings","Title","BookingRulesTitle","NothingBooked","cart","ssnLookup","Cart","SSNLookup","PersonAlreadyExists","PersonNotFound","PerfomLookupButtonText","SubscriptionTermsTitle","EmptyCart","TermsCheckboxTitle","IAccept","TheTerms","PaymentInputLabel","ContinueToPayment","SSN","BirthDate","DebitInfo","HasNoSwedishSSN","CouponCodeLabel","CouponCodeTitle","CouponCodeButtonText","CouponCodePlaceholder","CouponCodeInvalid","FirstName","LastName","YourProfile","FavouriteBusinessUnitTitle","FavouriteBusinessUnitDefault","FavouriteBusinessUnitDescription","CartName","Email","TelephoneNumber","Street","ZipCode","City","Facility","FacilityExplanation","PaymentMethodsTitle","PaymentMethodsAutogiroExtraInfo","PickPaymentMethod","PhoneNumberLabel","PaymentMethodBank","PaymentMethodCard","PaymentMethodSwish","SSNPlaceholder","SSNPlaceholderNoSwedishSSN","FirstNamePlaceholder","LastNamePlaceholder","EmailPlaceholder","StreetPlaceholder","TelephonePlaceholder","FacilityInput","PhoneNumberPlaceholder","PaymentMethodPlaceholder","AccountTitle","TotalToPay","INVALID_ADDRESS","PERSONNR_WRONG_FORMAT","PERSONNR_ALREADY_EXISTS","EPOST_ALREADY_EXISTS","EPOST_NOT_VALID","INVALID_INPUT","UNKNOWN_ERROR","UserAlreadyExistsInMittFriskis","SSN_INVALID_SE","ADDRESS_INVALID_POSTALCODE","common","newPasswordField","NewPasswordField","NewPasswordRules","Password","PasswordPlaceholder","RepeatPassword","RepeatPasswordPlaceholder","Common","Back","Continue","Hide","No","Cancel","Save","Show","Yes","SavingSucceed","SavingFailed","BackToProducts","Facilities","Open","OpenTomorrow","CloseTomorrow","OpenReception","OpenReceptionTomorrow","OpenLater","OpenReceptionLater","ExceptionalOpenTimes","Closed","GDPR","TermsCheckBoxTitleGDPR","GDRPTitle","Settings","Banner","loginMessages","LoginMessages","InvalidCredentials","Login","Foerening","ForgotPassword","SelectFoerening","Messages","GoBack","Hi","WhoYouAre","IdentifyYourSelf","PromptTitle","PromptDescription","PromptLoginDescription","PromptSignUpDescription","PromptSignUpButton","FoereningSelectMessage","brpPaymentErrorMessages","pastellDataPaymentErrorMessages","createPaymentErrorMessages","PaymentErrorMessages","BRP","f10","f101","f102","f103","f104","f105","f106","f107","f110","f13","f14","f15","f200","f201","f202","f203","f204","f205","f206","f207","f9","PastellData","CANCEL","ERROR","GeneralError","CreatePaymentErrorMessages","Autogiro","mainMenu","MainMenu","Friskis","GoToPublicWeb","Me","News","Notifications","Schedule","Subscriptions","TrainingStatistics","OnlineTraining","profile","profileMenu","ProfileMenu","CalendarSyncText","CalendarSyncTitle","NotificationSettingsText","NotificationSettingsTitle","PaymentsText","PaymentsTitle","ProfileText","ProfileLongText","ProfileTitle","TrainingPreferencesText","TrainingPreferencesTitle","UserAccountText","UserAccountTitle","UserAccount","ChangePassword","ChangePasswordTitle","EnterCurrentPassword","EnterCurrentPasswordPlaceHolder","PasswordChangedSuccessfully","PasswordChangeFailed","paymentSettings","PaymentSettings","Account","Avtalegiro","Card","Information","NoRegisteredPayments","TerminateInformation","TerminateInformationWhenEnabled","AccountNumber","ClearingNumber","DebitDetails","UpdateBankAccount","sectionDescription","SectionDescription","Profile","PaymentMethods","NotificationsSettings","TrainingPreferences","calendarSync","CalendarSync","Text","PickCalendar","Logout","Address","Firstname","Lastname","Phonenumber","RequiredFieldError","FieldAcceptOnlyChars","InvalidEmail","InvalidZipCode","InvalidTelNumber","MustSaveBeforeContinue","EmailAlreadyExists","Menu","ScheduleBookingStatus","EJ_BOKNINGSBART_DATE","EJ_BOKNINGSBART_DATE_DROPIN","FOERSENT_FOER_ATT_BOKA","FOERTIDIGT_FOER_ATT_BOKA","BOKNINGSBART","BOKNINGSBART_DROPIN","BOKNINGSBART_KOE","BOKNINGSBART_KOE_DROPIN","KOEPLATS","KOEPLATS_DROPIN","FULLT","FULLT_DROPIN","DROPIN","INSTAELLD","ScheduleDayPeriods","Morning","Midmorning","Lunch","Afternoon","Evening","scheduleMessages","ScheduleMessages","ALREADY_BOOKED","ALREADY_ON_WAITINGLIST","BOOKING_CLASHES_WITH_OTHER_BOOKING","CANCELLATION_CONFIRMATION","CANCELLATION_OK","CANCELLED","NO_FREE_SLOTS_AVAILABLE","OK_BOOK","OK_CANCEL","PassAddedToCalendar","PassCanceled","QUEUED","QueuePlaceNotification","TOO_LATE_TO_BOOK","TOO_LATE_TO_CANCEL","TOO_MANY_CONCURRENT_BOOKINGS","TOO_MANY_CONCURRENT_WAITINGLISTS","TOO_MANY_NO_SHOWS","UNKNOWN_ERROR_CANCEL","MISSING_PRIVILEGE","NOT_OPEN_FOR_BOOKING","BOOKING_TERMS_NOT_ACCEPTED","BOOKING_REQUIRES_MEMBERSHIP","BOOKING_RESOURCE_REQUIREMENT_HAS_CHANGED","BOOKING_RULE_PREVENTS_ADDING_TO_WAITING_LIST","BOOKING_RULE_PREVENTS_BOOKING","BOOKING_WAITING_LIST_NOT_ALLOWED_IF_FREE_SLOTS","BOOK_EVENT_INSUFFICIENT_SLOTS","BOOK_EVENT_NOT_IN_BOOKING_PERIOD","BOOK_SERVICE_INSUFFICIENT_RIGHTS","CANNOT_BOOK_CANCELLED_ACTIVITY","TOO_EARLY_TO_BOOK","NO_FREE_RESOURCES_AVAILABLE","UNPAID_INVOICES_EXIST","scheduleFilter","ScheduleFilter","Bokningsstatusar","Categories","Bokningsstatus","Favoritfilter","LedareOrTraenare","Tidpunkt","Traeningspass","Traeningsstaelle","Veckodag","ClearFilter","DeleteFilterConfirm","HideFilter","NameFilter","QuickSearchPlaceholder","DeleteFilter","NameFilterTitle","SaveFilter","SavedFilters","SearchWithFreeText","ShowFilter","EditFilter","FilterHasNoHits","MaxNumberOfItemsExceeded","SelectAllInCategory","MustPickOneGymTitle","MustPickOneGymButton","MustPickOneGymTitlePublicSchedule","MustPickOneGymButtonPublicSchedule","MustPickOneGymTitleSchedule","MustPickOneGymButtonSchedule","ScheduleView","ListView","WeekView","SchedulePublicWeb","CancelBookings","Hello","Identify","Info","MittFriskisHeader","MittFriskisLink","schedule","BookingRules","BookingRulesFor","BookingStatus","DayPeriods","Filter","View","ConfirmBook","ConfirmCancel","Places","QueuePosition","ShowRules","PublicWeb","PullToRefresh","ReleaseToRefresh","Refreshing","Signing","SignatureCaseNotSigned","SignatureCaseSigned","SigningName","SigningTitle","SigningTitleAllSigned","SigningTitleDirectDebit","SigningTitleMembership","shop","shopFilter","adminShop","shopFilterCategories","shopFilterCategoryValues","ShopFilterCategoryValues","ProductHow","DIRECT_DEBIT_NO","DIRECT_DEBIT_SE","MANUAL_DEBIT","RECURRING_CARD_PAYMENT","ProductWhen","Dag","DygnetRunt","ProductWho","Pensionar","Student","Tonaring","Vuxen","AdminShop","ShopNotAvailableForAdminTitle","ShopNotAvailableForAdminText","ShopNotAvailableForAdminReturnButtonText","CannotPurchaseInAdminShop","ProductNotFound","ShopFilter","Intro","ProductWhere","CategoryValues","TwoBusinessUnitsCardTitle","TwoBusinessUnitsCardDescription","NationalCardTitle","NationalCardDescription","Shop","RecommendedProducts","ShopName","RegisterName","AddToBasket","CannotBuyProduct","GoBackToPublicSite","TwoBusinessUnitCard","NationalCard","TrainingCardTabsTitle","AllProducts","ExactHits","OtherHits","NoExactHits","PublicShopBannerTitle","PublicShopBannerText","PublicShopCoreBannerTitle","PublicShopCoreBannerText","PublicShopSelectionDefault","MembershipTitle","MembershipDescription","AddedMembershipToBasket","NoProductsFoundFromFilter","ProductAddedToBasket","ProductExistsInBasket","CanOnlyAddOneOfTypeTraeningsKort","ShopNotAvailableTitle","ShopNotAvailableText","ShopNotAvailableReturnButtonText","Admin","DisplayProducts","HideProducts","startPageDesktopMenu","startPageDesktopMenuTitles","Subsctiptions","StartPage","NextPass","NoBookedPassTitle","NoBookedPassText","OpenSchema","ShowBokningar","Greetings","Statistics","ActivityTypesLast30Days","WorkoutsLastMonth","WorkoutsLastWeek","WorkoutsLastYear","WorkoutsPerMonth","WorkoutsPerWeek","WorkoutsPerYear","WorkoutsThisMonth","WorkoutsThisWeek","WorkoutsThisYear","DefaultValueGym","subscriptionsAndCardsMessages","SubscriptionsAndCardsMessages","ALREADY_TERMINATED","CANNOT_TERMINATE_SUBSCRIPTION","FAILED_TO_TERMINATE","OK","SubscriptionsAndCards","BannerText","BuyMore","CardHasExpired","ConfirmTerminateSubscription","Extend","Membership","NumberOfUnitsLeft","Renew","ShopButton","TrainingCards","SubscriptionReceipts","Valid","ValidFrom","ValidUntil","ValidBetween","BoundUntil","MembershipHasExpired","Terminated","MedlemsVillkor","HasNoMedlemsVillkor","HasNoSmsEmailVillkor","PassDetails","XDropsAvailable","DropInRule","PlayFilmAbout","LoadingFailed","PushNotificationSettings","NewsText","NewsTitle","QueueText","QueueTitle","TrainingCardText","TrainingCardTitle","WorkoutTitle","WorkoutText","changePasswordError","ChangePasswordError","UNKNOWN","INVALID_TOKEN","ResetPassword","ResetSucceeded","Add","FacilitiesText","SpecialInterests","SpecialInterestsText","WorkoutLevel","Children","Preferences","specificReceipt","pageTitles","SitecoreDictionary","CopyFailCode","UnknownError","PageNotFound","Receipt","ClickToSignAutogiro","ContinueToTheWebSite","DisplayReceipt","ContinueToApp","ReceiptText","ReceiptTitle","ReceiptAdditionalText","ReceiptAdditionalTitle","SpecificReceipt","PaymentMethod","ReceiptNumber","OrderNumber","SellerTitle","SellerInfo","Homepage","PhoneNumber","OrganisationId","BuyerTitle","Name","ProductsTitle","Product","Amount","Total","Sum","IncludingVAT","PayedToday","DirectDebitSe","DirectDebitNo","RecurringCardPayment","DirectDebitConsentTitle","ReceiptDetailsNotFoundTitle","CouponCode","PrintButton","ErrorPage","AnErrorOccured","ClickHereToRefresh","TooManyItems","RequestResetPasswordPage","Help","HowToLoginAnswer","HowToLoginQuestion","IForgotMyPassDesc","IForgotMyPassTitle","ResultFailed","ResultSucceed","SubmitButton","WhoCanUseAnswer","WhoCanUseQuestion","PassItem","InQueue","Left","EmptyPlaces","PageTitles","MembershipAndCards","Payment","ProfileAndSettings","PushNotifications","ShoppingBasket","TrainingsPreferences","AcceptBookingRulesPopup","TryAgain","FailedToUpdate","Accept","WeekDays","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","Today","Tomorrow","Months","January","February","March","April","May","June","July","August","September","October","November","December","SitecorePlaceholder","getStatusMessage","getSubscriptionStatusMessage","getShoppingBasketError","getWeekdaysObjectMap","dayKeys","weekdays","returnObject","dayKey","PersonLookupStatus","NotificationOptions","BasketActionTypes","SessionActionTypes","updateAutogiroAccountNumber","UPDATE_AUTOGIRO_ACCOUNT_NUMBER","updateAutoGiroClearingNumber","UPDATE_AUTOGIRO_CLEARING_NUMBER","addProduct","product","ADD_PRODUCT","showMembershipMessage","showMessage","SHOW_MEMBERSHIP_MESSAGE","showCouponMessage","SHOW_COUPON_MESSAGE","onCreatePaymentError","ERROR_ON_CREATE_PAYMENT","createBasket","valuta","CREATE_BASKET","updateBasket","products","UPDATE_BASKET","onBasketPurchaseError","ERROR_ON_PURCHASE","updateOrderAction","UPDATE_ORDER","setActiveFoerening","SetActiveFoerening","setShopFoerening","SetShopFoerening","setInloggadeFoereningar","inloggadeFoereningar","SetInloggadeFoereningar","setUserId","userId","SetUserId","setShouldAcceptBookingRulesAction","shouldAccept","ShouldAcceptBookingRules","setPassToBook","pass","SetPassIdToBook","setOrderId","orderId","SetOrderId","EntityStatus","CommandStatus","ContextTypes","FetchStatusAggregateTypes","FetchCommandTypes","PRODUCT_ERROR","Affaerssystem","ProductTypes","ShopFilterCategoryName","ShopActionType","fetching","aggregateType","contextType","MITT_FRISKIS","FETCHING","commandType","fetchingInBackground","FETCHING_IN_BACKGROUND","fetched","entity","SUCCESS","fetchedFailed","FAILED","initialCommand","INITIAL","executingCommand","EXECUTING","executedCommand","EXECUTED","executingCommandFailed","EXECUTING_FAILED","initialFetchState","setFetchStatus","fetchState","currentState","s","slice","sort","a","b","getEntityStatus","fetchStatus","getCommandStatus","getIsFetching","getIsFetchingInBackgound","getIsFetched","getHasLoadFailed","getIsExecuting","getIsExecuted","getIsExecutingFailed","getSubscriptionsDetails","kort","foereningsId","dispatch","resolve","api","ProductId","res","NOT_FOUND","getProducts","GET_PRODUCTS","fetchProducts","Fetch_Products","fetchFilters","Fetch_FilterCategories","updateShopFilterOptionsCategory","category","propertyValue","Shop_UpdateUserSelectedFilterOptionsProperty","emptyFilters","unfilteredProducts","filteredProducts","userSelectedFilterOptions","fullSetOfFilterProperties","filteredFilterCategories","getFilteredItems","userFilters","filteredItems","who","snatchFilterPropertiesFromProductData","getPropertyValuesForProperty","property","values","ProductReducer","stringifiedCachedFilterCategories","cachedFilteredFilterCategories","cachedUnfilteredProducts","f","p","FilterVal","fv","SitecoreId","cachedFilteredProducts","cachedFullSetOfPropertiesSnatchedFromScheduleData","cachedUserFilters","Shop_ClearUserSelectedFilterOptionsProperty","Shop_ResetProductsFilter","getPurchaseErrorMessage","provider","defaultError","toString","getQueryStringValue","location","search","encodeURIComponent","OutsideClickHandler","register","listener","addEventListener","delete","removeEventListener","getActiveFoerening","inloggadeFoerening","Id","SPECIAL_INTRESSE_TAGS","filterUtils","hasCategoryExpanded","categoryState","Object","keys","categoryName","atTop","constructSafeName","str","FoereningSwitcherActionTypes","PassUtils","isBookedPassCancelled","bokning","passList","Day","PassId","AerInstaelld","canAddProduct","productsInBasket","isPendingOrderChange","canAdd","Types","t","Traeningskort","Tvaafoereningskort","reduce","concat","setFoereningIdFromQueryParameter","foerening","foereningar","read","Foereningar","Namn","toLowerCase","query","AuthReducer","combineReducers","isAuthenticated","loginCmd","PassActionType","toogleFoereningSwitcher","isVisible","TOOGLE_SWITCHER","isSwitchingFoereningSwitcher","isSwitching","IS_SWITCHING","sitecoreUtils","parent","postMessage","self","PassDetailsReadActionType","updateDayData","passData","Day_UpdateDay","days","updateBokaPassStatus","passId","UpdateBokaPassStatus","updatePassDetailsData","PassDetails_UpdatePassDetails","passDetails","UIScheduleActionType","deleteBokning","bokningId","DeleteBokning","updateBokningarUI","Bokningar","GetBokningar","payload","bokningar","hasFetchedBokningarOnce","updateBokning","k","BokningId","statusMessage","readyToDelete","BokningarReducer","SetNextBokning","nextBokning","PopulateBokningar","AddBokning","UpdateStatusMessage","RemoveBokning","newDays","splice","UpdateDayExpanded","daysList","relevantDay","dayName","passReducer","AntalBokningsbaraPlatser","AntalBokningsbaraPlatserTotalt","AntalDropinPlatser","AntalIVaenteLista","AntalLedigaPlatser","AntalPlatserTotal","LedigaKoePlatser","MobileOSType","getBookingsInBackground","session","BOKNING","getBookings","getBookingsInForeground","promise","bokningarDaysInViewObject","getNextBokning","scheduleAvbokaPass","AVBOKA_PASS","post","statusMsg","dispatchPassForScheduleReducer","allDays","j","detailedPass","BokningStatus","nextBokningStartDate","bokningStartDate","now","Ios","showToast","data","dictionaryItem","webkit","messageHandlers","iosListener","askCalendarPermission","addToCalendar","fetchCalendars","setCalendarId","calendarId","openFriskisGo","Debug","Mobile","isIOS","isAndroid","Android","isDebug","LocationActionTypes","LocationSwitchViewActionType","isApp","app","parseInt","SitecoreActionType","passDetailsRouteAction","switchView","destination","Home","siteHasHistory","locationState","prev","kind","goToSchedule","goBack","withRedirect","route","isInShop","getIsPublicWebMode","PublicShop","getIsAdminWebMode","redirectTo","redirect","PublicShoppingBasket","AdminShoppingBasket","ProductDetails","PublicProductDetails","AdminProductDetails","AdminRegister","pagesWithTitleHeader","hasTitle","hasSubtitle","publicWebPages","PublicSchedule","showOnDesktop","PublicRegister","AdminLogin","adminWebPages","noShowsForHeader","noShowsForFooter","iframePages","isDesktop","shouldShow","getShowHeaderForLocation","getIsIframeMode","getPageTitle","isDesktopMode","Settings_Profile","Settings_UserAccount","Settings_TrainingPreferences","Settings_PaymentSettings","Settings_NotificationSettings","Settings_CalendarSyncSettings","Reset","productName","hasHeaderTitle","currentLocation","page","hasHeaderSubtitle","getHeaderSubtitleForCurrentLocation","getCurrentFoereningName","noShows","addressInNoShowsList","noShow","activeFoerening","fullFoerening","DisplayName","routesMap","Rules","CalendarActionTypes","allowBokaPass","AllowBokaPass","DictionaryStatus","DictionaryActionTypes","toggleSyncCalendar","syncCalendar","SetCalendarSync","setSelectedCalendarId","SetSelectedCalendar","setShouldShowCalendarSyncPopup","show","SetShouldShowCalendarSyncPopup","syncIsActive","shouldShowCalendarSyncPopup","calendarReducer","selectedCalendar","getCalendarSync","GET_CALENDAR","updateDictionaryStatus","UPDATE_STATUS","setupDictionary","dictionary","initialize","Languages","addTranslation","Translations","READY","getDefaultLanguage","PassFilterActionType","initialStatus","PaymentReadActionTypes","vaerden","soekbar","anvaendTranslate","favoritFilter","filterSynligt","filteredPassIds","unfilteredDays","flatFilter","fritextTerm","isFiltervalGrupp","filterval","getFilteredPassIdByDay","fritextFilter","l","d","passIds","dagIVeckan","anlaeggningsNamn","AnlaeggningsNamn","toLocaleLowerCase","traeningspass","PassNamn","tidpunkt","PeriodOfTheDay","veckodag","Instruktoerer","getFilteredPass","appliceraFilterPaaKategori","filterKategori","tp","vald","vaerde","uppdateraInkommandeFilterMedNuvarandeVal","inkommandeFilter","nuvarandeFilter","nuvarande","nv","namn","oeppen","nuvarandeFilterval","nfv","passFilterReducer","PassFilterSetFritextTerm","fritext","term","PassFilterUpdateUnfilteredDays","PassFilterSetFilter","PassFilterVisaFilter","visa","PassFilterSetKategoriVald","oeppenKategori","kategori","PassFilterSetFilterValt","filt","flat","flatKategori","valtFavoritFilterId","PassFilterSetAllaIFiltergruppVald","filtergruppNamn","PassFilterSetFilterIGruppVald","filterVal","PassFilterSetFiltergruppOeppnad","oeppnad","PassFilterCreateFavoritfilter","newFavorit","FilterId","PassFilterDeleteFavoritfilter","findIndex","filterId","PassFilterRensaFilter","newFilter","PassFilterSetFavoritfilterValt","favoritFilterId","PassFilterSetFavoritfilter","favoritfilter","PassFilterSetFilterFraanCache","cache","passFilterSetKategoriVald","passFilterVisaFilter","getFavouriteFilters","anvaendareId","savedFilters","saveFavouriteFilter","passFilterCreateFavoritfilter","deleteFavouriteFilter","favDelFilter","PassFilter","FilterName","UserId","passDaysList","passDaysInViewObject","shiftsForDay","pass1","pass2","m1","m2","fetchPassListInBackground","foereningsName","PASS_LIST","fetchPassList","fetchPassListInForeground","getPassListUrl","locale","weekday","getWeekdayName","getDay","month","getMonthName","getMonth","bokaPass","bokaKoePlats","BOKA_PASS","calendar","shouldShowPopup","request","url","filterUsed","passFilter","numberOfFiltersUsed","dataLayer","event","forening","FoereningNamn","filterUsage","NumberOfUsedfilters","autogiro","clearingNumber","accountNumber","BasketReducer","updatedState","shouldUpdateStorage","cachedBasket","DELETE_BASKET","existsInArray","DELETE_PRODUCT","newProducts","errorOnPurchase","errorsOnCreatePayment","ERROR_ON_CREATE_USER","errorsOnCreateUser","UPDATE_PAYMENT_METHOD","paymentMethodId","UPDATE_PHONE_NUMBER","phoneNumber","SkapaNyAnvaendareStatus","UserReadActionType","getPaymentSuccededAction","PaymentSucceded","paymentSucceded","setSignatureCasesAction","signatureCases","SignatureCases","setReceiptAction","receipt","resetBuyBasketCommand","shopFoerening","BUY_BASKET","basketHasProduct","productId","productsList","shoppingBasket","UpdateUserProfileCmdActionTypes","getUser","newValue","GET_USER","updatedUser","getLanguageCode","languageCode","GET_LANGUAGE_CODE","user","businessUnit","betalningsmedel","BankkortLista","AutogiroLista","AvtalegiroLista","IsEditEnabled","cachedAutogiroArray","CreateUserActionType","updateUser","UpdateUser","updateUserProfileCmd","FoereningId","User","propertyName","cmdId","ClearErrorCode","SPARA_ANVAENDARE","originaleProfileData","ErrorCode","changePasswordActionType","updateFirstName","Update_FirstName","updateLastName","Update_LastName","updateStreet","Update_Street","updateZipCode","Update_ZipCode","updateCity","Update_City","UpdateLookupStatus","Update_LookupStatus","personnr","foernamn","efternamn","epost","mobiltelefonnr","postkod","stad","gata","loesenord","anlaeggningsId","loesenordRepeat","gdprTermsAccepted","hasNoSwedishSsn","updateAutogiroActionType","changePasswordActions","UPDATE_CURRENT_PASSWORD_VALUE","UPDATE_NEW_PASSWORD_VALUE","UPDATE_REPEAT_NEW_PASSWORD_VALUE","UPDATE_NEW_PASSWORD_VALIDITY","UPDATE_REPEAT_NEW_PASSWORD_VALIDITY","UPDATE_CURRENT_PASSWORD_VALIDITY","UPDATE_FORM_VALIDITY","CLEAR","currentPassword","newPassword","repeatNewPassword","isCurrentPasswordValid","isNewPasswordValid","isRepeatNewPasswordValid","isFormValid","BetalningsmedelTypes","updateAutogiroActions","SET_CLEARING_NUMBER","SET_ACCOUNT_NUMBER","currentClearingNumber","currentAccountNumber","SET_AUTOGIRO_TO_UPDATE","SET_CLEARING_NUMBER_VALIDITY","SET_ACCOUNT_NUMBER_VALIDITY","errorMessage","SET_ERROR_MESSAGE","updateAutogiro","requestBody","updateAutogiroCmd","BankAccountNumber","UPDATE_AUTOGIRO","put","GET_AUTOGIRO","userReducer","currentUserInfo","RegisterUserId","GET_BETALNINGSMEDEL","newState","write","ClearUser","createUserCmd","Update_SSN","Update_AnlaeggningsId","Update_Email","Update_Telephone","Update_Password","Update_RepeatPassword","Update_HasNoSwedishSsn","lookupStatus","changePasswordCmd","actionTypes","getProfileInfo","ANVAENDARE","authCookie","FoereningarLista","OnlinetraeningStatus","getRegistreradeBetalningsmedel","REGISTRERADE_BETALNINGS_MEDEL","getBetalningsmedel","autoGiroInfo","BetalningsmedelType","getExtraFoereningInformation","foereningName","foereningExtraInfo","SetFoereningExtraInfo","extraInfo","fo","ExtraFoereningInfo","setInloggadeFoereningarInStorage","LanguageActionTypes","fetchNews","NEWS","info","setupTranslation","SET_LANGUAGE","LanguageCode","addProductToOrder","ADD_TO_ORDER","OrderId","mapOrderToBasket","subscriptionItems","customerType","removeSubscription","REMOVE_FROM_ORDER","subscription","SubscriptionId","subscriptionId","doUpdateBasket","checkMembershipMessage","parsedProducts","subscriptionItemsToProducts","Medlemskap","Pris","price","amount","CustomerType","cachedProducts","result2","logout","goToLogin","shouldRedirectToPublicWeb","clearLoginId","redirectToPublicWeb","getActiveFoereningUrl","x","ExternalUrl","open","login","Username","LOGIN","authenticateAndSetupUser","LanguageId","AktivFoereningId","setAuthTokenInStorage","languageId","setLanguageInStorage","AnvaendarId","SET_USER_ON_ORDER","setUserOnOrder","updateAuthenticationAndUserSetup","loginWithCreds","loginFromSchedule","bokaPassRequest","bokaPassFromSitecore","checkAuthStatus","RefreshToken","hasAValidRefreshToken","getRefreshToken","switchToFoerening","updateActiveFoerening","sendErrorReport","AppCrashed","errorReport","stackframes","ErrorStackParser","console","warn","BookingRulesActionTypes","UIScheduleViewType","setFocusOnFoerening","SET_FOCUS_ON_FOEREING","focusedFoereningId","isSwitchingFoerening","UIScheduleFilterActionType","scrollToDay","shouldDisableSticky","viewShowing","LISTVIEW","clickFromDayPicker","clickFromDayPickerDay","scrollBottom","scrollRightPercent","setSelectedPassById","passDay","selectedPass","SetSelectedPass","MainMenuButtonEnum","MainMenuActiveItem","defaultFilterCategoryLocalState","showEdit","clicked","topPosition","selectedCategoryItem","initialScheduleFilterState","MainMenuActionTypes","menuShowing","NONE","getMenuSettingBasedOnCurrenlyShowingMenu","stateValue","actionValue","HeaderActionTypes","setActiveMenu","menu","SHOW_MENU","closeMenu","HeaderIconEnum","setHeaderIcons","leftDesktopIcon","rightDesktopIcon","leftMobileIcon","rightMobileIcon","SET_ICONS","SidebarStatus","SidebarContentType","SidebarSize","FRISKIS_LOGO","CALENDAR","title","visible","SiteSwitcherStatus","visibility","HIDDEN","contentType","SCHEDULE","size","MINIMISED","showSideBarInFullDesktopWidth","sideBarState","scheduleUIState","MAXIMISED","getIsSidebarMaximised","closeSideBar","ApplicationViewEnum","ProfilePropertyNameValues","uiSettingsProfileActionType","applicationView","MOBILE","getApplicationViewModeIsDesktop","applicationMode","DESKTOP","UIBookingActionType","uiProfileSettings","AnlaeggningarActionType","centerDay","UIShopFilterActionType","anlaeggningar","ImageActionType","initialShopFilterState","selectedCategory","ShouldShowProducts","ProductWhat","setSelectedCategory","SetCategory","NewNotificationActionTypes","images","getImages","GET_BILDER","SetImages","PasswordResetActionTypes","PasswordResetErrorCodes","fetchNewNotificationsCount","count","SET_NEW_NOTIFICATIONS_COUNT","uiReducer","LanguageName","bottomMenu","menuValue","CLOSE_MENU","mainMenuIsOpen","SetScrollToDay","SetDayClickedFromDayPicker","SetClickedFromDayPicker","SetViewTypeToList","SetViewTypeToWeek","WEEKVIEW","SetShouldDisableSticky","SetScrollPosition","SetFilterToExpanded","SetFilterToMinimised","SetCategoryClicked","localState","SetCategoryNotClicked","ToggleCategoryClicked","SetCategoryAtTop","SetCategoryAtNotTop","SetCategoryTopPosition","SetCategoryLocalState","categoryStateProperties","newCategoryState","numberOfCategoriesClicked","numberOfCategoriesAtTop","weHaveAtLeastOneCategoryExpanded","weHaveMoreThanOneCategoryExpanded","header","RESET_ICONS","sideBar","SHOWING","siteSwitcher","SHOW_FULLSCREEN","uiSettingsProfileState","GetUISettingsProfileUnderEdit","UpdateUISettingsProfileUnderEdit","uiSettingsProfileUnderEdit","UpdateUISettingsProfileUnderClick","PropertyFieldUnderClick","propertyFieldUnderClick","bookings","SetSelectedDayPickerDay","GetAnlaeggningar","sitecore","DisableBokaPass","ToggleShowProducts","showing","image","foereningSwitcher","newNotification","newNotificationsCount","bookingRules","RegisterDeviceCmdActionTypes","passwordResetLinkRequested","SET_PASSWORD_RESET","passwordResetRequestCompleted","isSuccess","setPasswordResetResult","RESET_PASSWORD_RESULT","passwordResetSucceeded","doClearPasswordResetState","CLEAR_PASSWORD_RESET","isRepeatNewPassword","registerDeviceId","deviceId","os","cmdFailed","REGISTER_DEVICE_ID","mobileOs","InitializeActionTypes","pushNotificationsReducer","registerDeviceCmd","globalReducer","RemoveError","e","AppResumeAfterCrash","SetAdminError","debug","errorFetch","reason","SAVING","SAVING_FAILED","DELETED","ClearActiveFoerening","foe","shouldAcceptBookingRules","passToBook","passowrdReset","requestPasswordResetLinkResult","passwordResetErrorCode","SET_NEW_PASSWORD","SET_REPEAT_NEW_PASSWORD","SET_IS_NEW_PASSWORD_VALID","SET_IS_REPEAT_NEW_PASSWORD_VALID","pushNotifications","AnlaeggningarReadActionTypes","initialized","initializeReducer","SET_INITIALIZED","AnlaeggningsId","sitecoreAnlaeggningar","FoereningActionTypes","anlaeggningarReducer","ADD_SITECORE_ANLAEGGNINGAR","getSitecoreAnlaeggningar","foereningNamn","countryId","ANLAEGGNINGAR","passDetailsReducer","TrainingPreferencesReadActionType","addBokningRegler","ADD_BOKNINGREGLER","addMedlemsVillkor","ADD_MEDLEMSVILLKOR","addSmsAndEmailVillkor","ADD_SMS_EMAIL_VILLKOR","FoereningarReducer","ADD_FOERENINGAR","RuleText","SmsEmailVillkor","fetchReglerIfNotInStore","TrainingPreferencesWriteActionType","savedSpecialintressen","childrenAgeGroups","workoutlevels","MedlemskapOchKortReadActionType","workoutLevels","childAgeGroups","favoriteAnlaeggningar","TrainingPreferencesReducer","AddSpecialintressen","AddSavedSpecialintressen","specialintressen","RemoveSavedSpecialintressen","SpecialintresseId","specialintresseId","AddSavedAnlaeggningar","RemoveSavedAnlaeggning","RemoveWorkoutLevel","workoutLevel","AddWorkoutLevel","RemoveChildAgeGroup","childAgeGroup","AddChildAgeGroup","RemoveSpecialintresse","RemoveFavoriteAnlaeggningar","RemoveFavoriteAnlaeggning","anlaeggning","AddFavoriteAnlaeggning","favoriteAnlaeggning","getSpecialIntressen","getSavedSpecialIntressen","deleteSavedSpecialintresse","specialintresse","deleteSavedAnlaeggning","getSavedAnlaeggningar","MedlemskapOchKortWriteActionType","getMedlemskapOchKort","abonnemang","GetMedlemskapOchKort","AffaerssytemType","P_RESULTCODE","updateAvslutaAbonnemangStatus","abonnemangId","endDate","UpdateAvslutaAbonnemangStatusAction","cachedAbonnemangArray","MedlemskapOchKortReducer","Abonnemang","ClearMedlemskapOchKort","TraeningskortLista","StatusMessage","Slutdatum","IsTerminateEnabled","StatisticsReadActionType","getSignatureCases","SIGNATURECASE","getPaymentMethods","GET_PAYMENT_METHODS","paymentMethods","PaymentReducer","ReceiptInfos","receiptInfos","WorkoutTypesPercentageLast30Days","StatisticsReducers","GetTraeningsstatistik","statistics","IconCrossColor","notifications","NotificationsReducer","GetNotifications","markNotificationsAsRead","userid","MARK_NOTIFICATIONS_AS_READ","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","setApplicationMode","innerWidth","innerHeight","outerWidth","outerHeight","getDeviceDimensions","mapDispatchToProps","onResumeAfterCrash","connect","className","href","ErrorBubble","onClose","Errors","props","TransitionGroup","CSSTransition","in","mountOnEnter","unmountOnExit","classNames","timeout","IconArrow","borderColor","color","transform","direction","getRotation","IconBigClose","y","viewBox","cx","cy","IconCalendar","renderThis","xmlns","this","x1","y1","x2","y2","React","IconChevron","getClassName","onClick","StatusStyles","ColorValues","IconCross","red","black","gray","iconColor","getColor","version","IconDrop","fill","fillRule","IconFilterCalendarView","inactiveStyle","activeStyle","inactive","getClassForIcon","IconHeartStyling","IconFilterListView","IconHeart","styling","filled","empty","disabled","getClass","desc","IconInformation","IconMenuArrow","stroke","strokeWidth","points","IconMenuBookedSessions","classA","classB","strokeColor","data-name","rx","ry","strokeLinecap","strokeMiterlimit","IconMenuCalendar","random","Math","rand","round","randD","IconMenuFacility","fillColour","IconMenuFriskis","IconMenuMembership","IconMenuNews","strokeLinejoin","IconMenuNotifications","IconMenuSettings","IconMenuStatistics","IconMenuSwitch","IconMessage","IconMyAccount","defaultStyle","IconProfile","IconRemoveStyling","IconMyWorkout","IconPlay","enableBackground","IconPlus","IconRemove","white","IconPen","IconCheckmark","selected","IconKvitto","xmlnsXlink","filterUnits","dx","dy","stdDeviation","stopColor","offset","xlinkHref","mask","IconBookingStatus","extraClassName","SettingsPages","IconMenuCalendarSync","IconRoundButtonCheckmark","Spinner","appearance","alignment","TextBox","enabled","alerts","alwaysHideActions","isWorking","onValueChange","activateEditMode","onTextBoxClick","onRevertClicked","onAcceptClicked","myClass","getTextBoxClass","autoFocus","onChange","onFocus","warning","isExecuting","shouldShowInfoOnHover","onBokatEllerAvbokat","confirmationVisible","setConfirmationVisible","isHoveringOnPassBooker","setIsHoveringOnPassBooker","getPassStatus","bookedPass","Koad","onMouseOver","onMouseOut","handleOnClick","bookable","handleOnClickIconButton","KoPlats","getIconButtonText","styleType","getIconButtonStyle","cssClass","handleNo","handleYes","queued","avbokaPass","confirmationText","getConfirmationText","SelectInput","getContainerClasses","getLabel","getSelectContainerClasses","getValueContainerClasses","getValueName","getSelectClasses","tabIndex","tabindex","mapOptions","opt","label","target","option","isDisabled","mainClass","labelColor","align","shouldValidate","theme","htmlFor","getLabelClasses","alignLabel","EmailInput","setState","validate","newProps","onValidChanged","MainInput","alt","autocomplete","autoCorrect","checked","formId","max","maxlength","min","placeholder","readonly","required","step","smallRadius","border","infoText","infoType","hideSpinner","autoSelect","skaVisaInfoText","setSkaVisaInfoText","cName","ref","focus","getInputClasses","autoComplete","form","maxLength","readOnly","updateValue","currentTarget","select","onBlur","classes","getInfoTextClasses","Checkbox","getIconClasses","preventDefault","stopPropagation","handleOnValueChange","children","MainButton","buttonStyle","typeB","backgroundImage","backgroundUrl","overlay","background","StatusBar","handleClick","closeBtn","ConfirmationTextBox","SmallHeader","headerText","IconButton","Logotyp","src","icon","Bow","BookingItem","showStatusMessage","showConfirmation","avbokaStatus","hideConfirmation","getStatusMessageClass","isCancelled","getVisibleStatus","goToPass","setSelectedPass","to","PassStart","PassLaengd","input","instruktoerer","dayViewObjectKey","booking","Overlay","hideHeader","close","unlockBackgroundScrollCallback","setUnlockBackgroundScrollCallback","render","ReactDOM","FriskisLogo","wrapper","getElementById","createElement","appendChild","removeChild","ShoppingBasketButton","giveShoppingBasketButtonSomeFocus","shoppingBasketButtonHasSomeFocus","prevProps","NewPassword","getContainerClassName","alignText","passwordValue","val","onPasswordChange","isPasswordValid","repeatPasswordValue","onRepeatPasswordChange","isRepeatPasswordValid","validateInput","updateRepeatPassword","repeatPassword","updatePasswordValidity","isRepeatedPasswordValid","updateRepeatPasswordValidity","PopOver","getContainerStyle","containerRef","marginLeft","marginRight","containerRect","getBoundingClientRect","constraintRect","constraintElement","left","m","horizontalPadding","right","bottom","verticalPadding","popoverClassName","skipArrow","popoverContainerClassName","AutogiroInput","clearingNumberValue","onClearingNumberChange","accountNumberValue","onAccountNumberChange","PopupGDPR","buttons","button","buttonType","isGdprVillkorOpened","toggleGdprVillkor","bind","inloggadFoereningId","evt","editableUser","getIsExecutedForPropertyName","getIsExecutingFailedForPropertyName","resetCmdForProperty","onUserPropertyChange","uiField","onEditField","onRevertField","unchangedUser","isInputCorrectlyFormatted","onAcceptField","msg","cmdErrorCode","fieldChanged","renderAlerts","getIsExecutingForPropertyName","renderTextBox","initializeUserProfileCmd","getCmdId","editedUser","NextBokningTitle","bowStyles","bowStylesCalculated","NoBookedPass","iconRef","textRef","openFilterIcon","isSafari","navigator","vendor","userAgent","iOS","platform","iOS2","match","filterIco","setAttribute","hardRefreshListener","refresh","openSidebarSchedule","showSidebar","goToScheduleMobile","onScheduleClick","setTextRef","setIconRef","elementRef","hardRefresh","updateBowStyles","offsetLeft","offsetWidth","Start","offsetHeight","offsetTop","End","angleDeg","dx1","dy1","dx2","dy2","a1","atan2","deg","PI","getAngleBetween","BookedPass","diffInDays","startOf","diff","relativeTime","formatedDay","getTitle","BookingItemContainer","NextBokning","MobileLinks","goToBookings","goToSchema","PassItemSkeleton","getNumberOfDays","maxAmountOfPassItemsPerDay","Array","from","_","num","aria-current","PassListSkeleton","numberOfDays","StartPageDesktopBanner","userName","BookingsFetched","DesktopLinks","onlineTraining","inloggadFoerening","OnlineTrainingUrl","links","calendarIcon","notiserIcon","traeningsstatistikIcon","traeningsstaellenIcon","nyheterIcon","medlemskapIcon","rel","onlineTreaningsIcon","link","NewsItem","fosURL","imageUrl","itemUrl","tags","TranslateIfSpecialIntresse","startPageMode","n","ImageUrl","Tags","Url","mapDispatch","setNewsRef","element","getNewNotificationsCount","aktivFoerening","getPassList","fetchBokningarStatus","fetchBokningar","scrollToValue","behavior","getMainContainerClasses","getMainContentClasses","setSidebarToContainSchedule","setSidebarToVisible","fetchPassListStatus","scrollToNews","auth","FancyNavLink","activeClassName","exact","clickHandler","isTargetBlank","FoereningarList","mapFoereningar","FoereningarListContainer","errorStatusClass","checkAutoCompleteIntervalHandle","emailEl","passwordEl","ignoreAutoCheck","statusMessageVisible","statusMessageClass","publicScheduleLoginExpanded","publicScheduleMode","setInterval","checkForAutoComplete","isExecutingFailed","clearInterval","psClasses","getPublicScheduleClasses","expandLoginForm","onSubmit","submit","username","UsernameIsValid","handleEmailChange","handleEmailIsValidChange","handlePasswordChange","isVisitingShop","foreningId","handleFoereningChange","shouldDisableSubmit","RouteMap","Location","LoginToToBuy","ProductsInBasket","onLogin","updateUsername","updateEmailAndPasswordReferences","emailDomValue","passwordDomValue","foereningNamnFromQuery","foereningFromQuery","foereningIdFromQuery","siteSwitcherState","SiteSwitcherState","isSiteSwitcherShowing","setSiteSwitcherToVisible","setSiteSwitcherToHidden","NotFound","RequestPasswordReset","LocationAction","reset","emailIsValid","getResultMessage","passwordReseted","clearPasswordResetState","requestResetPasswordLink","passwordResetResult","passwordResetInfo","SettingsLinks","renderLink","heading","description","activeSettingsPage","NotificationSettings","shopActive","SettingsPageHeader","AutogiroSettings","updateClearingNumberValidity","updateAccountNumberValidity","updateBankAccount","updateAutogiroCmdIsExecuting","updateAutogiroCmdExecutionFailed","updateAutogiroCmdIsExecuted","updateClearingNumberValue","updateAccountNumberValue","PaymentSettingsItem","showUpdateAutogiroForm","toggleUpdateAutogiro","enableEdit","setAutogiroToUpdate","bankName","AutogiroSettingsContainer","cardNumber","cardIssuerName","Autogiros","BankName","Avtalegiros","Cards","CardNr","CardIssuer","hasRegisteredPayments","hasPayments","avtalegiro","cards","terminateInformation","onCurrentPasswordChange","onNewPasswordValidityChange","onRepeatNewPasswordValidityChange","clearChangeFetchPasswordCmd","activeFoereningId","clearChangePasswordCmd","changePassword","currentPasswordValue","changePasswordCmdIsExecuting","newPasswordValue","repeatNewPasswordValue","updateNewPasswordValue","updateRepeatNewPasswordValue","changePasswordCmdExecutionFailed","changePasswordCmdIsExecuted","updateCurrentPasswordValue","updateCurrentPasswordValidity","updateFormValidity","updateNewPasswordValidity","updateRepeatNewPasswordValidity","savedAnlaeggningar","trainingPreferences","AENDRA_LOESENORD","OldPassword","ConfirmPassword","aktiveFoereningId","didUpdateFail","setting","originalValue","PassCancelled","Vaentelista","TraeningskortAboutToExpire","Switch","isOn","handleToggle","switchId","onColor","ListItem","subheader","showSpinner","activated","fetchPushNotificationSettings","updatePushNotificationSettings","pushNotificationSettings","NOTIFICATIONS_SETTINGS","UserNotificatonSettingsId","PreferenceItem","addItem","toggleSelected","selectedCallback","AnlaeggningarList","onSave","preferences","removeFavoriteAnlaeggning","addFavoriteAnlaeggning","isAlreadySaved","saveFavoriteAnlaeggningar","savedFavoriteAnlaeggningar","ItemDropdownList","isListExpanded","toggleList","savedItems","PreferenceList","removeChildAgeGroup","addChildAgeGroup","saveSpecialIntressen","removeWorkoutLevel","addWorkoutLevel","AnvaendarePreferenceList","shouldTranslate","SpecialintresseName","isAnlaeggningarOverlayOpen","isSpecialIntresenOverlayOpen","toggleIsAnlaeggnignarOverlayOpen","toggleIsSpecialIntressenOverlayOpen","closeSpecialIntressenOverlayOpen","activeFoerning","CountryId","removeSavedFavoriteAnlaeggning","removeSavedSpecialintresse","removeFavoriteAnlaeggningar","removeSpecialintressen","specialIntresse","Anlaeggningar","fetchCalendarStatus","setCalendarSync","SET_CALENDAR_SYNC","setSelectedCalendar","SET_SELECTED_CALENDAR","lsCalendars","setLsCalendars","LSCalendars","interval","cal","SettingBanner","getSettingsDescription","hasActivePage","getBannerClasses","settingsPageTitle","CalendarSyncContainer","getSettingsPage","defaultImage","require","mapDispatchProps","activeFoereing","AerButikAktiv","TrainingCard","okStatusClass","userIsInformed","terminateCard","errorOnBuy","IsAktiv","AntalAaterstaaendeKlipp","TraeningskortStatus","isAktiv","AutoGiro","Startdatum","Bindningstid","terminate","actions","extendButton","buy","terminateButton","IsRenewable","shouldWarn","getCardDetailsText","getCardActions","AVSLUTA_MEDLEMSSKAP","TrainingCardContainer","PRODUCT_INFO","Subscription","SubscriptionReceipt","Valuta","Datum","getAbonnemang","MEDLEMSKAP_OCH_KORT","getReceiptInfos","RECEIPT_INFOS","resetMedlemskapOchKort","initialFetch","buySubscription","medlemskapOchKortStatus","receiptInfosStatus","receipts","payment","isFetching","MedlemskapLista","sub","hideRenewButton","card","DetailsBlockDesktop","mStartTime","mEndTime","EndTime","dayAndMonth","endTime","Length","Lokal","Header","Tickers","tickers","ticker","YouTubeVideo","PlayButton","videoStarted","videoPaused","videoId","buttonText","playVideo","opts","playerVars","controls","disablekb","autoplay","fs","iv_load_policy","modestbranding","playsinline","showinfo","onReady","bindPlayButtonClick","onEnd","stopVideo","onPause","pauseVideo","onPlay","onclick","HeroImage","PassDetailsHeroBanner","shouldShowVideo","YoutubeVideoId","shouldShowHeroBild","HeroBild","placeholderUrl","YoutubeVideoPlaceholderUrl","Rubrik","getFontSize","fontSize","fontWeight","ScheduleFilterCategoryName","ShortList","list","large","Summary","bodyn","observer","ResizeObserver","entries","entry","classList","scrollWidth","contentRect","disconnect","unobserve","observe","dangerouslySetInnerHTML","__html","fullText","role","Slots","setStatusMessageVisible","userInformed","setUserInformed","statusMessageText","setStatusMessageText","clearTimeout","PassBookerContainer","textColor","renderInfoSection","toggle","focusedFoerening","PassDetailsInfoBlock","ExtraInfo","DetailsBlockMobile","start","end","getTimeAndPlace","PassDetailsContent","Beskrivning","Ingress","PassDetailsHeroBannerSkeleton","PassDetailsSkeleton","PassDetailsFailedFetch","fetchPassDetailsInternal","fetchingMethod","PASS","fetchPassDetails","fetchFailed","ShoppingBasketProduct","coupon","discount","getFormatedPrice","ShoppingBasketCoupon","ShoppingBasketTotalPrice","ShoppingBasketProductsList","renderProduct","productList","isAdmin","deleteSubscription","deleteCoupon","ShoppingBasketProductsListContainer","couponCode","Code","removeCoupon","FormContainer","isFetched","getMedlemsVillkor","medlemsVillkor","medlemsVillkorNotFound","getVillkor","MEDLEM_VILLKOR","TermsCheckbox","toogleMedlemskapVillkor","isMedlemsVillkorOpened","isChecked","newVal","PaymentPurchaseFailMessage","scrollIntoView","block","getSmsEmailVillkor","smsEmailVillkor","smsEmailVillkorNotFound","SMS_EMAIL_VILLKOR","TermsCheckboxSmsEmail","toggleSmsEmailVillkor","isSmsEmailVillkorOpened","termsAccepted","KnownUserBuyingForm","clearPurchaseErrors","updatePaymentMethod","mapPaymentMethods","getPaymentMethodLabel","getExtraInfo","paymentMethod","getPaymentMethod","SWISH","updatePhoneNumber","BANK","CARD","setCampaignCode","updateTermsAccepted","containsOnlyNumber","handleCampaignChange","addCoupon","getPaymentMethodsStatus","shouldShowCouponMessage","shouldShowAutogiroInfo","disableSubmit","isPaymentMethodValid","clearCreatePaymentErrors","KnownUserBuyingFormContainer","autogiroInfo","prod","newWindow","bankAccountInfo","signed","updatePhoneNumberAction","resetBuyCommand","allProducts","isPublicWebMode","RouteActionType","ShoppingBasketContainer","FacilityExceptionalOpenTimes","FacilityExceptionalOpenTimesIndicator","clickEvent","showInfoOverlay","setIsDetailsVisible","FacilitiesItem","isOpen","additionalOpen","additionalClose","street","getPrimaryText","receptionOpen","receptionClosing","receptionOpenTomorrow","additionalReceptionOpen","additionalReceptionClosing","getSecondaryText","shouldShowExceptionalOpenTimes","exceptionalHoursText","exceptionalHoursEnd","exceptionalHoursStart","mExHoursStart","mExHoursEnd","endOf","dateNow","additionalStart","additionalStartDate","additionalCloseDate","currentDate","startDate","convertStringToDate","getFullYear","justifyContent","flexDirection","marginTop","Disabled","OpeningHours","AdditionalOpeningHours","ClosingHours","AdditionalClosingHours","ReceptionOpeningHours","AdditionalReceptionOpeningHours","ReceptionClosingHours","AdditionalReceptionClosingHours","openTomorrow","closeTomorrow","ExceptionalHoursEnd","ExceptionalHoursStart","ExceptionalHoursText","FacilitiesContainer","ShopFilterCategoryItem","giveToggleButtonSomeFocus","setSelectedCategoryItem","isSelected","getSelectedValuesForDisplay","selectedValues","internalCategoryName","weekdaysMapObject","selectedValuesWithLocalisedNames","dayPeriodsMapObject","dayPeriods","dayPeriod","getDayPeriodsObjectMap","getTranslatedCategoryValuesForShopFilter","translationMapping","categoryKeys","categoryKey","categoryObject","categoryObjectKey","translationKey","getShopFilterCategoryValuesObjectMap","categoryValue","Tab","ShopFilterCategory","instance","setClickedCategory","nativeEvent","stopImmediatePropagation","currentlySelectedCategoryItem","setTopPosition","filterUIState","mappedCategories","hasSelectedValues","croppedText","crop","node","categoryDescription","onFavoriteFilterDelete","filterCategoryActionFunctions","listItemGroupingMapping","isFullDesktopView","filterType","showSearchbar","expandCategory","filterCategoryProps","ShopFilterType","shopFilterUIState","getShopCategoryLocalState","scheduleFilterUIState","filterCategoryDataProps","selectAllCategoryListItems","unSelectCategoryHeader","Tabs","tabTitles","Map","Local","TwoBusinessUnits","National","tabs","selectedTab","setSelectedTab","BackButton","defaultPropertyKeys","listItemIdProperty","listItemKeyProperty","listItemTextProperty","mapDataForListItem","filterProperties","listItemValueForDisplay","Description","Type","getListItemData","getActionFunctionsForCategory","filterFunctions","renderCategoryContainer","presentationCategoryName","filterCategoryListItemDataPropertyKeys","categoryData","filterableProperties","listItemGroupingMappings","ShopFilterCategoryContainer","onFilterDelete","getClasses","filterClasses","filterHidden","getCurrentUserFilterAmount","currentUserFilter","renderFilterButton","onHideProductClick","renderShopCategoryContainer","subCategories","filterIsForSchedule","filterIsForShop","productsIsShowing","stringTraeningsstaelle","stringTraeningspass","stringLedareOrTraenare","stringTidpunkt","stringVeckodag","renderShopCategories","totalNumberOfItems","maxNumberOfItemsExcceeded","onFilterSave","onClearFilters","scheduleIsFetching","hideFilterSaving","hideTrashCan","expandFilter","CategorySlider","categories","setCategories","newCategories","loopIndex","setSelectedItem","statusMessageTimeout","isInBasket","removeProduct","setStatusMessageTimeout","hasOwnProperty","goToProductDetails","NamnSitecore","NrOfMonths","toFixed","ProductGroup","checkIfInBasket","customerTypeId","Products","productData","productType","mapProductGroups","filters","o","strictlyMatchingProducts","productsLoaded","isShowing","groupedProducts","selectedFilters","getSelectedFilters","nrOfSelectedFilters","productsWithHits","getProductsWithFilterHits","exactHits","hits","others","reduceProductHit","getHitsForProductsAndFilter","NotificationTypes","defaultFilterFunctions","onFilter","onSelect","selectedItemsInRelevantCategory","valueAlreadySelected","selecteItemsdWithoutCurrentValue","arrayToAppend","onDeselect","onClearCategoryFilters","clearShopFilterOptionsCategory","ShopContainer","cachedFullSetOfFilterProperties","isFetchingFilters","GET_FILTER","isFiltersFetched","foereningDisplayName","isVisiting","isShowingProducts","getFilters","productDetailsRouteAction","toggleShowProducts","setTabs","toggleButtonHasSomeFocus","setToggleButtonHasSomeFocus","unlockBackgroundCallback","setUnlockBackgroundCallback","toggleProducts","categoryId","Nationellt_Traeningskort","tab","ShopFilterContainer","maxNumberOfItems","GrayLabel","labelText","ProductMobileHeader","isExpanded","handleToggleProduct","ShopAssociationSelectorView","handleChange","updateFoerening","clearBasket","ShopAssociationSelectorViewContainer","isInitialied","Signature","ev","isFetchingSignatureCases","fetchSignatures","hasFetchedSignatureCases","signatureCase","isLoading","hasMedlemskap","isAutogiro","hasAutogiro","documentUrl","getButtonTitleForSignatureCase","SignatureContainer","ShopWrapperContainer","foereningAktiv","isInitialized","isFetchingProducts","isProductsFetched","isFetchingOrder","GET_ORDER","CREATE_ORDER","isOrderFetched","nonAdmin","__handled__","createOrder","getOrder","orderFromLocalStorage","basketFromSessionStorage","basket","processResult","renderSignatures","renderPaymentSuccess","foereningUrl","receiptid","orderid","mapActionsToProps","fid","RESULTCODE","B","PaymentContainer","getReceipt","receiptId","GET_RECEIPT","getReceiptForOrder","ReceiptContainer","fetchReceiptStatus","fetchProductsStatus","Betalsaett","Kvittonummer","Bestaellningsnummer","Saeljare","Adress","Gata","Postnummer","Stad","Land","CareOf","Telefonnummer","Organisationsnummer","Koepare","Foernamn","Efternamn","Autogiromedgivanden","consentName","getTranslatedConsentName","Produkter","ProduktId","ProduktNamn","Antal","Kupong","Momssatser","Procent","Betalningar","payed","current","sum","getPayedToday","Betalmetod","print","BookingDayItem","BookingList","updateBookingDayExpanded","containerClassName","onGetBookings","scheduleClasses","BookingRulesContainer","Notification","notification","NotificationType","PASS_CANCELLED","PASS_VAENTELISTA_FAATT_PLATS","TRAENINGSKORT_EXPIRE","classModifiers","Read","Link","openUrl","getClassNames","startsWith","getIcon","getShortText","fetchNotifications","NOTIFICATIONS","SideBySideStatistics","mainTitle","dataValue1","duration","useEasing","title1","dataValue2","title2","ListOfStatistics","Percentage","suffix","WorkoutName","fetchTraeningsstatistik","TRAENINGSSTATISTIK","getTraeningsstatistik","gotoLogin","clearResetPassword","resetSuccess","setNewPassword","setIsNewPasswordValid","setRepeatNewPassword","setIsRepeatNewPasswordValid","resetErrorCode","resetPassword","resetPasswordRequest","RESET_LOESENORD","BokningStatusPopup","getStatusClass","getStatusClassSmall","sendEventToSitecore","getMessage","BokningStatusPopupContainer","PublicSchedulePopup","hiddenFromStart","LoginContainer","closePopup","PublicSchedulePopupContainer","setSidebarToMinimised","isSideBarMaximised","setSidebarToHidden","setSidebarToMaximised","disableBokaPass","closeSchedule","passInDay","bokaStatus","allowBokaPassFromSitecore","isWeekView","baseClass","NotBookable","showLoginPopOver","setShowLoginPopOver","showAtStart","setShowAtStart","closePublicPopup","passName","statusBarIsActive","passIsBooked","renderPass","formatTime","dateTime","mDateTime","ScheduleModeSwitcher","setScheduleToListView","setScheduleToWeekView","ele","scheduleViewType","onListViewClick","scheduleStateIs","onWeekViewClick","PassFilterOverlayMessage","visaIngaTraeffarMeddelande","visaTraeningsstaelleMeddelande","visaFilter","vaeljKategori","harPass","ids","traeningsstaelleFilter","harTraeffar","isPassDetailsShowing","vaeljFilter","passFilterSetFilterValt","vaeljAllaIFiltergrupp","passFilterSetAllaIFiltergruppVald","vaeljFilterIGrupp","passFilterSetFilterIGruppVald","oeppnaFiltergrupp","passFilterSetFiltergruppOeppnad","vaeljFavoritfilter","favoritfilterId","skapaFavoritfilter","rensaFilter","setFilterSynligt","synligt","deleteFavoritFilter","getFavoritFilters","setFilterFraanCache","passFilterSetFilterFraanCache","popOverConstraintContainer","sparaFilterOeppnat","setSparaFilterOeppnat","taBortFilterOeppnat","setTaBortFilterOeppnat","spararNyttFilter","setSpararNyttFilter","nyttFavoritfilterNamn","setNyttFavoritfilterNamn","soekstraengar","setSoekstraengar","favoritFilterBorttagning","setFavoritFilterBorttagning","uppdateraPassFilterFraanQuery","uppdateraFilterFraanCache","numberOfFavorites","cached","FILTER","BACK","getAntalValdaFilter","flattenKategori","renderTaBortContainer","borttagning","tasBort","fraagaSynlig","renderSparaContainer","renderKategoriContent","filtrerbarKategori","kategoriNamn","vf","f2","v2","allaFavoritfilter","defaultAnlaeggning","defaultTraeningspass","defaultFilter","cachedFilter","parsedLegacyFilter","favFilter","parsedNewFilter","parsedFilter","paddingLeft","display","cursor","harValdaFilter","konstrueraValdaFilternamn","PassFilterOverlayMessageContainer","passListFetchKey","inloggade","skaVisaTraeningsstaelleMeddelande","filterExpanded","fetchPasslistStatus","numbersOfFilters","visarOverlay","getPassListInBackground","setScheduleToWeekMode","setFilterVisible","setFritextTerm","showPassForDay","setShowPassForDay","totalNumberOfPass","setTotalNumberOfPass","setScrollRightPercent","shouldUpdateShownDays","setShouldUpdateShownDays","timeAtLastInput","setTimeAtLastInput","container","resetTimer","hasOrIsFetchingPassList","lockBackground","numberOfPass","firstDayWithPass","toggleDayExpanded","showPass","skaFaellasUt","handleScroll","eventTarget","scrollRight","scrollLeft","clientWidth","scrollToLeft","scrollToRight","hasNotOrIsFetchingPassListInForeground","unlockBackground","firstVisibleHeaderRendered","margin","filtericon","backgroundColor","lineHeight","textAlign","borderRadius","ScheduleModeSwitcherContainer","PassFilterContainer","onRefresh","pullingContent","refreshingContent","isPullable","shouldShowPassToday","rend","passIndex","PassItemContainer","renderPassList","onScroll","PassHeader","topDay","setTopDay","passListContainer","setPassListContainer","headerWidth","setHeaderWidth","setDays","parentElement","clientHeight","onResize","dayItems","dayArray","childElementCount","dayText","textContent","zIndex","mapActionToProps","ScheduleContainer","String","findProductId","pathname","lastIndexOf","findCustomerType","findProduct","selectedProduct","mainButtonDisabled","getButtonText","displaySpinner","BeskrivningSitecore","ProductDetailsContainer","AccountForm","MemberProfileForm","showErrorMessage","AnvaendareAerRegistrerad","AnvaendareEjHittad","getPersonLookupErrorMessage","ssn","handleSSNChange","isSsnValid","getPersonLookup","updateHasNoSwedishSsn","hasDebitProductInBasket","EjTillgaenglig","AnvaendareHittad","firstName","handleFirstNameChange","lastName","handleLastNameChange","telephone","handleTelephoneChange","isPhonenumberValid","handleStreetChange","zipCode","handleZipCodeChange","city","handleCityChange","openLoginPrompt","updateSSN","validateEmail","updateTelephone","isEmailValid","isStatusBarVisible","NewUserForm","fetchStateAnlaeggningar","fetchAnlaeggningar","getPersonLookupAvailable","updateAnlaeggningsId","AnlaeggningId","anlaeggningChanged","AnlaeggningNamn","updateGdprTermsAccepted","isCreatingUser","shouldDisable","onContinueToPayment","showStatusBar","errorMessages","createUser","isPersonnrValid","isFoernamnValid","isEfternamnValid","isMobiltelefonnrValid","isGataValid","isPostkodValid","isStadValid","hasSelectedTraeningsstaelle","swedishSsn","spraakId","SKAPA_ANVAENDARE","onCreateUserError","GET_PERSON_LOOKUP_AVAILABLE","GET_PERSON_LOOKUP","Status","Data","annlaeggningar","NewUserFormContainer","NotFoundElementSync","LoginPage","AdminLoginPage","SubscriptionsPage","SubscriptionsAndCardsContainer","FacilitiesPage","NewsPage","PaymentPage","ResetPasswordPage","isDesktopFullViewMode","PassDetailsContainer","BookingsContainer","MobileHeaderContent","MainMenuListItem","reverse","showIcon","newEventsCount","showSeperator","MainMenuListAccount","setAccountMenu","FoereningSwitcherItem","availableFoereningar","showFoereningSwitcher","currentFoerening","IconFriskisGo","MainMenuListWorkout","getFoereningUrl","setWorkoutMenu","externUrl","onlineTrainingUrl","MainMenuListSwitcher","menuToShow","MY_ACCOUNT","MY_WORKOUT","MainMenuListWorkoutContainer","getShowingClass","activeMenu","renderActiveMenuList","iosPushNotification","setIosDeviceId","detail","androidPushNotification","setAndroidDeviceId","androidCalendars","iosCalendars","updatePasslist","authenticated","accountMenu","workoutMenu","handleOutsideClick","menuShouldBeShown","renderMainMenuContainer","openMenu","getActiveStyles","getIsActive","myAccountHasNewEvents","HeaderTitle","subtitle","DesktopHeaderContent","showHeaderTitle","isFirstVisit","MainMenuContainer","headerTitle","headerSubtitle","LoginPrompt","cat","toggleLoginPromptOpen","onLoginClick","HeaderContent","closeFilterIcon","checkIdInBasket","getHeaderTitleContent","locationIsProductPage","locationIsShoppingBasket","locationIsRegister","isStartPage","getShoppingBasketLinkUrl","numberOfProductsInBasket","logoUrl","leftIcon","brand","getContentForHeaderMiddle","rightIcon","goToHome","CLOSE","SHOPPINGBASKET","isSiteSwitcherShowingFullscreen","setSiteSwitcherToVisibleFullscreen","sidebarState","showBackButton","LocationActionType","shouldShowBackButton","backButtonPosition","getBackButtonPosition","foereningFromURL","URLSearchParams","isIframe","isAuthenticatedInShopFoerening","showHeader","SideBar","SideBarClasses","isConfirmationSideBar","closeHandler","hideSideBar","showCloser","closeIcon","renderCloser","renderContentType","Container","CalendarSyncPopup","popupShown","updateFailed","updateBookingRuleForActiveFoerening","ACCEPT_BOOKING_RULES","accept","updateBookingRuleForActiveFoereningAction","FoereningSwitcher","SiteSwitcher","getExpandedClass","setExpandedState","halfState","fullState","halfExpanded","fullExpanded","fullExpand","halfExpand","getArrowDirection","SiteSwitcherLogin","handleClickOutside","contains","isClickOutside","outsideState","outsideClick","getExpandedHeaderClass","canShowSchedule","isModalOpened","App","caughtError","vh","setProperty","shopFoereningFromLocalStorage","inloggadFoereningFromLocalStorage","allFoerenignar","setInitialized","scrollDiv","scrollbarWidth","caughtRejection","updateIcon","resetHeaderIcons","oldProps","doPageSpecificInit","mainContent","scheduleVisible","querySelector","add","remove","errorInfo","componentStack","firstVisitLocalStorageItem","hasAppCrashed","dismissError","isSidebarShowing","sidebarContentType","showFooter","stillAuthenticating","isMobileMode","isLoginPage","isShopPage","isProductPage","isShoppingBasketPage","isPaymentPage","isReceiptPage","isResetPasswordPage","modalKnappar","datumFoerModalKanInteStaengas","isBetween","visaModal","datumFoerModalVisas","marginBottom","isDebugAndroid","isDebugIos","schemaUrl","SiteSwitcherContainer","getClassesForContainer","getClassesForHeader","HeaderContainer","getClassesforMainContent","SideBarContainer","shouldShowCalendarSync","passDetailsVisible","pageTitle","pgTitle","headerClasses","pageHasTitle","containerClasses","GET_FOERENINGAR","DatumFoerModalVisas","DatumFoerModalKanInteStaengas","SchemaUrl","all","LOADING","localDict","foereningarUrl","lastKnownFoerening","removeError","loginFromShop","goToPublicWeb","displayConfirmLeave","confirmLeave","callback","confirm","querySerializer","queryString","basename","connectRoutes","locationReducer","reducer","locationMiddleware","middleware","locationEnhancer","enhancer","createStore","localeReducer","rootReducer","applyMiddleware","thunkMiddleware","configureStore","rootEl","attachFastClick","Component","renderDom","renderApp"],"mappings":"iGAAAA,EAAOC,QAAU,IAA0B,iD,oBCA3CD,EAAOC,QAAU,IAA0B,wC,oBCA3CD,EAAOC,QAAU,IAA0B,qD,oBCA3CD,EAAOC,QAAU,IAA0B,0D,oBCA3CD,EAAOC,QAAU,IAA0B,uD,oBCA3CD,EAAOC,QAAU,IAA0B,uD,oBCA3CD,EAAOC,QAAU,IAA0B,kD,oBCA3CD,EAAOC,QAAU,IAA0B,iD,oBCA3CD,EAAOC,QAAU,IAA0B,uD,oBCA3CD,EAAOC,QAAU,IAA0B,4C,oBCA3CD,EAAOC,QAAU,IAA0B,mD,oBCA3CD,EAAOC,QAAU,IAA0B,oC,oBCA3CD,EAAOC,QAAU,IAA0B,2C,iGCA3CD,EAAOC,QAAU,IAA0B,8C,gHCK/BC,E,2EAAAA,K,8DAAAA,M,KAIL,ICTKC,EDSCC,EAA8B,SACzCC,GADyC,MAEF,CACvCC,KAAMJ,EAA4BK,4BAClCF,a,OEDIG,EAAiD,GAE1CC,EAA8E,WAGlD,IAFvCC,EAEsC,uDAF9BF,EACRG,EACsC,uCACtC,OAAQA,EAAOL,MACb,KAAKJ,EAA4BK,4BAC/B,OAAO,2BACFG,GACAC,EAAON,UAEd,QACE,OAAOK,K,SDzBDP,K,oBAAAA,M,KASL,IEPKS,ECKNC,EAA8B,CAClCC,KAAM,IAGKC,EAAc,WAA0D,IAAzDL,EAAwD,uDAAhDG,EAA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K,GAC7B,IAAMmC,EAAkC,CACtCkgH,oBAAqB,SAACC,EAAsBC,GAG1CA,EAFiBz6G,OAAO06G,QAAQF,KAIlCG,gBAAiBC,GAGjBC,cAAUh7G,GAGZ,EAIIi7G,wBAAmBl4E,GAAWvoC,GAHvB0gH,EADX,EACEC,QACYC,EAFd,EAEEC,WACUC,EAHZ,EAGEC,SAEIz1E,EAAIo1E,EAyBV,OAxBcM,YqRkEW,SAACN,EAAyCO,GAA1C,OACzBnjF,YAA2B,CACzBr1B,OAAQ6iD,GACRzwB,SAAU6lF,EACV3vE,OAAQkwE,EACR/sF,KAAMiN,GACN7B,YAAaouB,GACb1jB,WAAY+iB,GACZtH,cAAe2H,GACf7vB,YAAa2wB,GACbhZ,KAAMiF,GACNpa,UAAWO,GACXi4C,oBAAqBxpB,GACrB6B,WAAYS,GACZwf,KAAMhzC,GACN4W,eAAgBhC,GAChBytC,QAAShuB,GACTjgC,QAASyH,GACT84B,WAAYF,GACZI,cAAeC,GACfr1D,KAAMC,EACNs8E,yBAA0B58E,EAC1Bw0C,SAAUjI,GACVsI,WAAY5E,KrRxFZg0E,CAAY51E,EAAG21E,MACfpjH,EACAm1D,GAAiB8tD,EAAkBK,YAAgBP,EAAoBQ,OoR/BtDC,GAEfC,GAASn9G,SAASghE,eAAe,QAUvChhE,SAASg3B,iBAAiB,eAAe,WACnC,qBAAsBh3B,UACxBA,SAASg3B,iBAAiB,oBAAoB,kBAAMomF,IAAgBp9G,SAASyG,SAAO,MAXtE,WAAsB,IAArB42G,EAAoB,uDAAR7F,GAC7B8F,iBACE,gBAAC,WAAD,CAAUl5G,MAAOA,IACf,gBAACi5G,EAAD,OAEFF,IASJI,I,mBE1BAllH,EAAOC,QAAU,IAA0B,+C,mBCA3CD,EAAOC,QAAU,IAA0B,4C,mBCA3CD,EAAOC,QAAU,IAA0B,qC","file":"static/js/main.17b2419a.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/friskis-logo--white.0a4f114a.svg\";","module.exports = __webpack_public_path__ + \"static/media/start_sida.f626faa8.jpg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-calender.9f160eb0.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-notifications.2479436d.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-statistics.7d985187.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-facilities.2b5b332a.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-online-training.0c4036c1.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-news.e8a933c3.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-startpage-membership.36f468ca.svg\";","module.exports = __webpack_public_path__ + \"static/media/tanka_traening.beafe497.png\";","module.exports = __webpack_public_path__ + \"static/media/icon-checkmark--black.07f2b1c5.svg\";","module.exports = __webpack_public_path__ + \"static/media/bgbild.8c40cebe.jpg\";","module.exports = __webpack_public_path__ + \"static/media/icon-calender.7d81c957.svg\";","module.exports = __webpack_public_path__ + \"static/media/background-login.ec5b11d5.jpg\";","interface GetPushNotificationSettingsAction {\r\n type: PushNotificationsActionType.GetPushNotificationSettings;\r\n settings: fos.api.PushNotificationSettings;\r\n}\r\n\r\nexport enum PushNotificationsActionType {\r\n GetPushNotificationSettings = 'GET_PUSH_NOTIFICATION_SETTINGS',\r\n}\r\n\r\nexport const getPushNotificationSettings = (\r\n settings: fos.api.PushNotificationSettings\r\n): GetPushNotificationSettingsAction => ({\r\n type: PushNotificationsActionType.GetPushNotificationSettings,\r\n settings,\r\n});\r\n\r\nexport type PushNotificationSettingsActions = GetPushNotificationSettingsAction;\r\n","export enum NewsActionType {\r\n GetNews = 'GET_NEWS',\r\n}\r\n\r\nexport interface GetNewsAction {\r\n type: NewsActionType.GetNews;\r\n news: Array;\r\n}\r\n\r\nexport const getNews = (news: Array): GetNewsAction => ({\r\n type: NewsActionType.GetNews,\r\n news,\r\n});\r\n\r\nexport type NewsAction = GetNewsAction;\r\n","import { PushNotificationsActionType } from './pushNotificationSettingsActions';\r\nimport { Action } from 'store';\r\nimport { Reducer } from 'redux';\r\n\r\nexport interface PushNotificationSettingsRootState {\r\n UserNotificatonSettingsId?: number;\r\n PassCancelled?: boolean;\r\n Vaentelista?: boolean;\r\n News?: boolean;\r\n TraeningskortAboutToExpire?: boolean;\r\n}\r\n\r\nconst initalState: PushNotificationSettingsRootState = {};\r\n\r\nexport const PushNotificationSettingsReducer: Reducer = (\r\n state = initalState,\r\n action: Action\r\n): PushNotificationSettingsRootState => {\r\n switch (action.type) {\r\n case PushNotificationsActionType.GetPushNotificationSettings:\r\n return {\r\n ...state,\r\n ...action.settings,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ApiError } from './errorsModels';\r\n\r\nexport enum ActionType {\r\n AddError = 'errors/AddError',\r\n RemoveError = 'errors/RemoveError',\r\n AppCrashed = 'errors/AppCrashed',\r\n AppResumeAfterCrash = 'errors/AppResumeAfterCrash',\r\n SetAdminError = 'errors/SetAdminError',\r\n}\r\n\r\ninterface AddAction {\r\n type: ActionType.AddError;\r\n error: ApiError;\r\n}\r\n\r\ninterface RemoveAction {\r\n type: ActionType.RemoveError;\r\n error: ApiError;\r\n}\r\n\r\ninterface AppCrashed {\r\n type: ActionType.AppCrashed;\r\n error: Error;\r\n}\r\n\r\ninterface AppResumeAfterCrash {\r\n type: ActionType.AppResumeAfterCrash;\r\n}\r\ninterface SetAdminErrorAction {\r\n type: ActionType.SetAdminError;\r\n error: string;\r\n}\r\n\r\nexport type ErrorsAction = AddAction | RemoveAction | AppCrashed | AppResumeAfterCrash | SetAdminErrorAction;\r\n\r\nexport const addError = (error: ApiError): AddAction => ({\r\n type: ActionType.AddError,\r\n error,\r\n});\r\n\r\nexport const removeError = (error: ApiError): RemoveAction => ({\r\n type: ActionType.RemoveError,\r\n error,\r\n});\r\n\r\nexport const appCrashed = (error: Error): AppCrashed => ({\r\n type: ActionType.AppCrashed,\r\n error: error,\r\n});\r\n\r\nexport const appResumeAfterCrash = (): AppResumeAfterCrash => ({\r\n type: ActionType.AppResumeAfterCrash,\r\n});\r\n\r\nexport const setAdminError = (error: string): SetAdminErrorAction => ({\r\n type: ActionType.SetAdminError,\r\n error,\r\n});\r\n","import { Action } from 'store';\r\nimport { NewsActionType } from './newsActions';\r\n\r\nexport interface NewsRootState {\r\n news: Array;\r\n}\r\n\r\nconst initialstate: NewsRootState = {\r\n news: [],\r\n};\r\n\r\nexport const NewsReducer = (state = initialstate, action: Action): NewsRootState => {\r\n switch (action.type) {\r\n case NewsActionType.GetNews:\r\n return {\r\n ...state,\r\n news: action.news,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","interface GetAuthAction {\r\n type: AuthReadActionType.GetAuth;\r\n token: string;\r\n giltighetstid: string;\r\n}\r\n\r\ninterface ClearAuthAction {\r\n type: AuthReadActionType.ClearAuth;\r\n}\r\n\r\nexport type AuthReadActions = GetAuthAction | ClearAuthAction;\r\n\r\nexport enum AuthReadActionType {\r\n GetAuth = 'GET_AUTH',\r\n UpdateAuth = 'UPDATE_AUTH',\r\n ClearAuth = 'CLEAR_AUTH',\r\n}\r\n\r\nexport const setAuthToken = (token: string, giltighetstid: string): AuthReadActions => ({\r\n type: AuthReadActionType.GetAuth,\r\n token,\r\n giltighetstid,\r\n});\r\n\r\nexport const clearAuthToken = (): AuthReadActions => ({\r\n type: AuthReadActionType.ClearAuth,\r\n});\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { ApiError } from './errorsModels';\r\nimport { ActionType } from './errorsActions';\r\n\r\nexport interface ErrorsState {\r\n readonly errors: ReadonlyArray;\r\n readonly appCrashed: Error | null;\r\n readonly adminError: string;\r\n}\r\n\r\nconst initialState: ErrorsState = {\r\n errors: [],\r\n appCrashed: null,\r\n adminError: '',\r\n};\r\n\r\nexport const errorsReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case ActionType.AddError:\r\n return {\r\n ...state,\r\n errors: state.errors.concat([action.error]),\r\n };\r\n\r\n case ActionType.RemoveError:\r\n return {\r\n ...state,\r\n errors: state.errors.filter(e => e !== action.error),\r\n };\r\n\r\n case ActionType.AppCrashed:\r\n return {\r\n ...state,\r\n appCrashed: action.error,\r\n };\r\n\r\n case ActionType.AppResumeAfterCrash:\r\n return {\r\n ...state,\r\n appCrashed: null,\r\n };\r\n\r\n case ActionType.SetAdminError:\r\n return {\r\n ...state,\r\n adminError: action.error,\r\n };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport const getAllErrors = (state: ErrorsState) => state.errors;\r\n\r\nexport const getHasAppCrashed = (state: ErrorsState) => state.appCrashed !== null;\r\n","// tslint:disable:no-any\r\nimport { Action } from 'redux';\r\n\r\nlet errorIdCounter = 0;\r\n\r\nlet globalHeaders: {\r\n [key: string]: string;\r\n} = {};\r\n\r\nconst nextErrorId = () => ++errorIdCounter;\r\n\r\nconst safeJsonParse = (text: string): any | undefined => {\r\n try {\r\n return JSON.parse(text);\r\n } catch (err) {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst isApiErrorResponse = (errorObject: any): errorObject is ApiErrorResponse =>\r\n errorObject && errorObject.Felkod && typeof errorObject.Felmeddelande !== 'undefined';\r\n\r\nconst getApiErrorMessage = (error: ApiErrorResponse) =>\r\n error.Felmeddelande ||\r\n (error.ValidationErrors ? error.ValidationErrors.map(v => v.UserMessage).join('. ') : 'någonting gick fel');\r\n\r\nconst rejectTextAsErrorMessage = (\r\n text: string,\r\n method: string,\r\n endpoint: string,\r\n status: number,\r\n statusText: string,\r\n errorCode: string | null = null\r\n): ErrorMessage => ({\r\n id: nextErrorId(),\r\n message: text,\r\n errorCode: errorCode,\r\n http: {\r\n method: method.toUpperCase(),\r\n endpoint,\r\n status,\r\n statusText,\r\n response: text,\r\n },\r\n});\r\n\r\nconst rejectJsonAsErrorMessage = (\r\n json: any,\r\n method: string,\r\n endpoint: string,\r\n status: number,\r\n statusText: string,\r\n errorCode: string | null = null\r\n): ErrorMessage => {\r\n const http = {\r\n method,\r\n endpoint,\r\n status,\r\n statusText,\r\n response: json,\r\n };\r\n\r\n if (isApiErrorResponse(json)) {\r\n return { id: nextErrorId(), errorCode: errorCode, message: getApiErrorMessage(json), http };\r\n } else if (typeof json.message === 'string') {\r\n return { id: nextErrorId(), errorCode: errorCode, message: json.message, http };\r\n } else if (typeof json === 'string') {\r\n return { id: nextErrorId(), errorCode: errorCode, message: json, http };\r\n }\r\n\r\n return { id: nextErrorId(), errorCode: errorCode, message: 'Hoppsan, någonting gick fel', http };\r\n};\r\n\r\nconst xUsername = process.env.REACT_APP_X_USERNAME;\r\n\r\nconst callApi = (\r\n rootEndpoint: string,\r\n endpoint: string,\r\n options: RequestInit,\r\n isAnonymous?: boolean\r\n): Promise => {\r\n if (process.env.NODE_ENV !== 'production' && typeof xUsername !== 'undefined') {\r\n // Om ej production och x-username är satt skickar vi med den vid varje anrop\r\n options.headers = { ...options.headers, 'X-Username': xUsername };\r\n }\r\n\r\n return fetch(`${rootEndpoint}/${endpoint}`, { ...options, credentials: 'include' }).then(\r\n response =>\r\n response.text().then(\r\n text => {\r\n const json = safeJsonParse(text);\r\n\r\n if ((text && typeof json === 'undefined') || (!response.ok && !text)) {\r\n return Promise.reject(\r\n rejectTextAsErrorMessage(\r\n text,\r\n options.method || 'GET',\r\n endpoint,\r\n response.status,\r\n response.statusText,\r\n response.headers.get('X-FoS-Guid')\r\n )\r\n );\r\n }\r\n\r\n if (!response.ok) {\r\n return Promise.reject(\r\n rejectJsonAsErrorMessage(\r\n json,\r\n options.method || 'GET',\r\n endpoint,\r\n response.status,\r\n response.statusText,\r\n response.headers.get('X-FoS-Guid')\r\n )\r\n );\r\n }\r\n\r\n return json;\r\n },\r\n texterr =>\r\n Promise.reject(\r\n rejectTextAsErrorMessage(\r\n texterr,\r\n options.method || 'GET',\r\n endpoint,\r\n response.status,\r\n response.statusText,\r\n response.headers.get('X-FoS-Guid')\r\n )\r\n )\r\n ),\r\n _fetcherror =>\r\n Promise.reject(\r\n rejectTextAsErrorMessage('Du verkar vara offline', options.method || 'GET', endpoint, 999, 'Offline')\r\n )\r\n );\r\n};\r\n\r\nexport const configureApi = (configureOptions: ConfigureOptions) => ({\r\n get: (endpoint: string, options: Options = {}) =>\r\n apiCall(\r\n configureOptions,\r\n endpoint,\r\n {\r\n headers: {\r\n Accept: 'application/json',\r\n },\r\n },\r\n options\r\n ),\r\n put: (endpoint: string, payload: Payload, options: Options = {}) =>\r\n apiCall(\r\n configureOptions,\r\n endpoint,\r\n {\r\n method: 'PUT',\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(payload),\r\n },\r\n options\r\n ),\r\n post: (endpoint: string, payload: Payload, options: Options = {}) =>\r\n apiCall(\r\n configureOptions,\r\n endpoint,\r\n {\r\n method: 'POST',\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(payload),\r\n },\r\n options\r\n ),\r\n});\r\n\r\nconst apiCall = (\r\n configureOptions: ConfigureOptions,\r\n endpoint: string,\r\n init: RequestInit,\r\n options: Options\r\n) =>\r\n callApi(\r\n configureOptions.apiRootEndpoint,\r\n endpoint,\r\n {\r\n ...init,\r\n headers: {\r\n ...init.headers,\r\n ...options.headers,\r\n ...globalHeaders,\r\n },\r\n },\r\n options.anonymousCall\r\n )\r\n .then(\r\n response =>\r\n ({\r\n error: false,\r\n result: response,\r\n } as SuccessResult),\r\n (error: ErrorMessage) => {\r\n const muteErrorNotification =\r\n error.http &&\r\n options.muteErrorNotificationOnStatus &&\r\n options.muteErrorNotificationOnStatus.indexOf(error.http.status) >= 0;\r\n if (error.http) {\r\n switch (error.http.status) {\r\n case 401:\r\n if (!options.anonymousCall) {\r\n configureOptions.unauthorizedAction({\r\n id: nextErrorId(),\r\n message: 'Hoppsan, du blev utloggad!',\r\n errorCode: null,\r\n http: null,\r\n });\r\n } else {\r\n if (!muteErrorNotification) {\r\n configureOptions.errorActionCreator(error);\r\n }\r\n }\r\n break;\r\n default:\r\n if (!muteErrorNotification) {\r\n configureOptions.errorActionCreator(error);\r\n }\r\n }\r\n } else {\r\n if (!muteErrorNotification) {\r\n configureOptions.errorActionCreator(error);\r\n }\r\n }\r\n\r\n return {\r\n error: true,\r\n result: error,\r\n } as ErrorResult;\r\n }\r\n )\r\n .catch(error => {\r\n // Firefox workaround, does not detect unhandled rejection\r\n setTimeout(() => {\r\n throw error;\r\n }, 0);\r\n return Promise.reject(error);\r\n });\r\n\r\nexport const registerGlobalHeader = (headerKey: string, headerValue: string, overwrite: boolean = false): void => {\r\n if (globalHeaders[headerKey] !== null && !overwrite) {\r\n throw new Error(`${headerKey} is already defined as a global header`);\r\n } else {\r\n globalHeaders[headerKey] = headerValue;\r\n }\r\n};\r\n\r\nexport const removeGlobalHeader = (headerKey: string): void => {\r\n delete globalHeaders[headerKey];\r\n};\r\n\r\ninterface ApiErrorResponse {\r\n Felkod: string;\r\n Felmeddelande: string;\r\n ValidationErrors:\r\n | {\r\n Entry: string;\r\n Property: string;\r\n UserMessage: string;\r\n }[]\r\n | null;\r\n}\r\n\r\ninterface ConfigureOptions {\r\n apiRootEndpoint: string;\r\n unauthorizedAction: (errorMessage: ErrorMessage) => void;\r\n errorActionCreator: (errorMessage: ErrorMessage) => Action;\r\n}\r\n\r\ninterface Options {\r\n headers?: any;\r\n muteErrorNotificationOnStatus?: number[];\r\n anonymousCall?: boolean;\r\n}\r\n\r\nexport interface ErrorMessage {\r\n id: number;\r\n message: string;\r\n errorCode: string | null;\r\n http: {\r\n method: string;\r\n endpoint: string;\r\n status: number;\r\n statusText: string;\r\n response?: any;\r\n } | null;\r\n}\r\n\r\nexport interface SuccessResult {\r\n readonly error: false;\r\n readonly result: SuccessResponseType;\r\n}\r\n\r\nexport interface ErrorResult {\r\n readonly error: true;\r\n readonly result: ErrorMessage;\r\n}\r\n","export enum LoginCmdActionTypes {\r\n UPDATE_EMAIL = 'LOGIN_CMD/UPDATE_EMAIL',\r\n UPDATE_PASSWORD = 'LOGIN_CMD/UPDATE_PASSWORD',\r\n UPDATE_FOERENINGID = 'LOGIN_CMD/UPDATE_FOERENINGID',\r\n CLEAR_CMD = 'LOGIN_CMD/CLEAR_CMD',\r\n}\r\n\r\nexport interface UpdateEmailAction {\r\n type: LoginCmdActionTypes.UPDATE_EMAIL;\r\n email: string;\r\n}\r\n\r\nexport interface UpdatePasswordAction {\r\n type: LoginCmdActionTypes.UPDATE_PASSWORD;\r\n password: string;\r\n}\r\n\r\nexport interface UpdateFoereningIdAction {\r\n type: LoginCmdActionTypes.UPDATE_FOERENINGID;\r\n foereningId: number;\r\n}\r\nexport interface ClearCmdAction {\r\n type: LoginCmdActionTypes.CLEAR_CMD;\r\n}\r\n\r\nexport const updateEmail = (email: string): UpdateEmailAction => ({\r\n type: LoginCmdActionTypes.UPDATE_EMAIL,\r\n email,\r\n});\r\n\r\nexport const updateFoereningId = (foereningId: number): UpdateFoereningIdAction => ({\r\n type: LoginCmdActionTypes.UPDATE_FOERENINGID,\r\n foereningId,\r\n});\r\n\r\nexport const updatePassword = (password: string): UpdatePasswordAction => ({\r\n type: LoginCmdActionTypes.UPDATE_PASSWORD,\r\n password,\r\n});\r\n\r\nexport const clearLoginCmd = (): ClearCmdAction => ({\r\n type: LoginCmdActionTypes.CLEAR_CMD,\r\n});\r\n\r\nexport type LoginCmdActions = UpdateEmailAction | UpdatePasswordAction | UpdateFoereningIdAction | ClearCmdAction;\r\n","import { removeGlobalHeader } from './../../../websd/utils/configureApi';\r\nimport { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { AuthReadActionType } from './authReadActions';\r\nimport { registerGlobalHeader } from 'websd/utils/configureApi';\r\n\r\nexport interface AuthReadState {\r\n Token?: string;\r\n Giltighetstid?: Date;\r\n isAuthenticated?: boolean;\r\n}\r\n\r\nconst initialState: AuthReadState = {};\r\n\r\nexport const AuthReadReducer: Reducer = (state = initialState, action: Action): AuthReadState => {\r\n switch (action.type) {\r\n case AuthReadActionType.GetAuth:\r\n registerGlobalHeader('Authorization', `Bearer ${action.token}`, true);\r\n return {\r\n Token: action.token,\r\n Giltighetstid: new Date(action.giltighetstid),\r\n isAuthenticated: true,\r\n };\r\n\r\n case AuthReadActionType.ClearAuth:\r\n removeGlobalHeader('Authorization');\r\n return { isAuthenticated: false };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { LoginCmdActionTypes } from '.';\r\n\r\nexport interface LoginCmdState {\r\n email: string;\r\n password: string;\r\n foereningId: number;\r\n}\r\n\r\nexport const initialState: LoginCmdState = {\r\n email: '',\r\n password: '',\r\n foereningId: -1,\r\n};\r\n\r\nexport const loginCmdReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case LoginCmdActionTypes.UPDATE_EMAIL:\r\n return {\r\n ...state,\r\n email: action.email,\r\n };\r\n case LoginCmdActionTypes.UPDATE_PASSWORD:\r\n return {\r\n ...state,\r\n password: action.password,\r\n };\r\n case LoginCmdActionTypes.UPDATE_FOERENINGID:\r\n return {\r\n ...state,\r\n foereningId: action.foereningId,\r\n };\r\n case LoginCmdActionTypes.CLEAR_CMD:\r\n return initialState;\r\n default:\r\n return state;\r\n }\r\n};\r\n","/**\r\n * Kollar om en e-post adress är giltig eller inte\r\n * @param value e-post adressen\r\n * @returns true om e-post adressen är giltig annars false\r\n */\r\nexport const isValidEmail = (value: string): boolean => {\r\n // http://emailregex.com/\r\n const emailRegExp: RegExp = new RegExp(\r\n [\r\n '^(([^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\"]+(\\\\.[^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\"]+)*)',\r\n '|(\".+\"))@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}])',\r\n '|(([a-zA-Z\\\\-0-9]+\\\\.)+[a-zA-Z]{2,}))$',\r\n ].join('')\r\n );\r\n\r\n return emailRegExp.test(value);\r\n};\r\n\r\nexport const isAccountNumberValid = (value: string | number): boolean => !!value && !isNaN(Number(value));\r\n\r\nexport const isClearingNumberValid = (value: string | number): boolean => !!value && !isNaN(Number(value));\r\n","export const getCookie = (name: string): string | null => {\r\n const nameLenPlus = name.length + 1;\r\n return (\r\n document.cookie\r\n .split(';')\r\n .map(c => c.trim())\r\n .filter(cookie => {\r\n return cookie.substring(0, nameLenPlus) === `${name}=`;\r\n })\r\n .map(cookie => {\r\n return decodeURIComponent(cookie.substring(nameLenPlus));\r\n })[0] || null\r\n );\r\n};\r\n\r\nexport const deleteCookie = (name: string, path?: string, domain?: string) => {\r\n if (getCookie(name)) {\r\n document.cookie =\r\n name +\r\n '=' +\r\n (path ? ';path=' + path : '') +\r\n (domain ? ';domain=' + domain : '') +\r\n ';expires=Thu, 01 Jan 1970 00:00:01 GMT';\r\n }\r\n};\r\n\r\nexport function addCookie(name: string, content: string, path?: string, domain?: string, expirationDate?: Date) {\r\n document.cookie =\r\n `${name}=${content};` +\r\n (path ? `path=${path};` : '') +\r\n (domain ? `domain=${domain};` : '') +\r\n (expirationDate ? `expires=${expirationDate.toUTCString()};` : 'expires=;');\r\n}\r\n\r\nexport function clearCookies() {\r\n // https://stackoverflow.com/questions/179355/clearing-all-cookies-with-javascript\r\n var cookies = document.cookie.split(';');\r\n\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n var eqPos = cookie.indexOf('=');\r\n var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;\r\n document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';\r\n }\r\n}\r\n","import { getCookie, addCookie, clearCookies } from './../websd/utils/cookie';\r\nimport moment from 'moment';\r\n//eslint-disable-next-line valid-typeof\r\nconst isLocalStorageAvailable = typeof Storage !== null;\r\nconst expirationDateExt: string = '{{expDate}}';\r\n\r\ninterface LocalStorageItem {\r\n value: T | null;\r\n isExpired: boolean | null;\r\n ExpirationDate?: Date;\r\n}\r\n\r\nfunction addAsCookie(\r\n key: string,\r\n // tslint:disable-next-line:no-any\r\n item: any,\r\n expirationDate?: Date,\r\n overwrite: boolean = true\r\n) {\r\n const hasACookieWithSameName = getCookie(key) && getCookie(key) !== '';\r\n if (hasACookieWithSameName && !overwrite) {\r\n return;\r\n }\r\n addCookie(key, item, '/', undefined, expirationDate);\r\n}\r\n\r\nfunction saveItem(\r\n key: string,\r\n // tslint:disable-next-line:no-any\r\n item: any,\r\n expirationDate?: Date,\r\n overwrite: boolean = true,\r\n useCookiesIfNotPossible: boolean = true\r\n) {\r\n if (!isLocalStorageAvailable && useCookiesIfNotPossible) {\r\n addAsCookie(key, item, expirationDate, overwrite);\r\n } else {\r\n if (isLocalStorageAvailable) {\r\n const currentItem = getItem(key);\r\n if (overwrite || !currentItem || !currentItem.value || currentItem.value === '' || currentItem.isExpired) {\r\n window.localStorage.setItem(key, JSON.stringify(item));\r\n if (expirationDate) {\r\n expirationDate.setDate(expirationDate.getDate() + 7);\r\n window.localStorage.setItem(key + expirationDateExt, expirationDate.toUTCString());\r\n } else {\r\n removeItem(key + expirationDateExt);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction saveItemInSession(\r\n key: string,\r\n // tslint:disable-next-line:no-any\r\n item: any,\r\n overwrite: boolean = true,\r\n useCookiesIfNotPossible: boolean = true\r\n) {\r\n if (!isLocalStorageAvailable && useCookiesIfNotPossible) {\r\n addAsCookie(key, item, undefined, overwrite);\r\n } else {\r\n if (isLocalStorageAvailable) {\r\n const currentItem = getItem(key);\r\n if (overwrite || !currentItem) {\r\n window.sessionStorage.setItem(key, JSON.stringify(item));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction getItem(key: string, useCookiesIfNotPossible: boolean = true): LocalStorageItem | null {\r\n let value: T;\r\n if (!isLocalStorageAvailable && !useCookiesIfNotPossible) {\r\n return null;\r\n }\r\n\r\n const item: string | null = isLocalStorageAvailable ? window.localStorage.getItem(key) : getCookie(key);\r\n if (!item) {\r\n return null;\r\n }\r\n value = JSON.parse(item) as T;\r\n if (!isLocalStorageAvailable) {\r\n return {\r\n value,\r\n isExpired: false,\r\n };\r\n }\r\n\r\n const expirationDate: string | null = window.localStorage.getItem(key + expirationDateExt);\r\n let isExpired: boolean | null = null;\r\n let mExpirationDate: moment.Moment | undefined = undefined;\r\n if (expirationDate && expirationDate !== '') {\r\n mExpirationDate = moment(expirationDate);\r\n isExpired = mExpirationDate.isBefore(moment());\r\n }\r\n return {\r\n value,\r\n isExpired,\r\n ExpirationDate: !isExpired && mExpirationDate && mExpirationDate.isValid() ? mExpirationDate.toDate() : undefined,\r\n };\r\n}\r\n\r\nfunction getItemFromSession(key: string, useCookiesIfNotPossible: boolean = true): T | null {\r\n let value: T;\r\n if (!isLocalStorageAvailable && !useCookiesIfNotPossible) {\r\n return null;\r\n }\r\n\r\n const item: string | null = isLocalStorageAvailable ? window.sessionStorage.getItem(key) : getCookie(key);\r\n if (!item) {\r\n return null;\r\n }\r\n value = JSON.parse(item) as T;\r\n return value;\r\n}\r\n\r\nfunction removeItem(key: string) {\r\n if (isLocalStorageAvailable) {\r\n window.localStorage.removeItem(key);\r\n window.localStorage.removeItem(key + expirationDateExt);\r\n }\r\n}\r\n\r\nfunction removeItemFromSession(key: string) {\r\n if (isLocalStorageAvailable) {\r\n window.sessionStorage.removeItem(key);\r\n }\r\n}\r\n\r\nfunction clear() {\r\n if (isLocalStorageAvailable) {\r\n window.sessionStorage.clear();\r\n window.localStorage.clear();\r\n }\r\n clearCookies();\r\n}\r\n\r\nexport const localStorage = {\r\n saveItem,\r\n saveItemInSession,\r\n getItem,\r\n getItemFromSession,\r\n removeItem,\r\n removeItemFromSession,\r\n clear,\r\n};\r\n","import moment from 'moment';\r\nimport { localStorage } from './localStorage';\r\n\r\nconst storedAuthName: string = process.env.REACT_APP_AUTH_COOKIE as string;\r\n\r\nexport function readToken(): fos.api.TokenModel | null {\r\n const storedAuth = localStorage.getItem(storedAuthName);\r\n if (!storedAuth) {\r\n return null;\r\n }\r\n return storedAuth.value;\r\n}\r\n\r\nexport function getRefreshToken(): string {\r\n const authToken = readToken();\r\n if (authToken) {\r\n return authToken.RefreshToken;\r\n }\r\n\r\n return '';\r\n}\r\n\r\nexport function hasAValidAuthToken(): boolean {\r\n const authToken = readToken();\r\n\r\n if (!authToken) {\r\n return false;\r\n }\r\n\r\n const giltighetstid = moment(authToken.Giltighetstid);\r\n if (!authToken.Token || moment().isAfter(giltighetstid)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nexport function hasAValidRefreshToken(): boolean {\r\n const authToken = readToken();\r\n\r\n if (!authToken) {\r\n return false;\r\n }\r\n\r\n if (authToken.RefreshToken) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function clearSavedAuth() {\r\n localStorage.removeItem(storedAuthName);\r\n\r\n sessionStorage.clear();\r\n const arr: string[] = []; // Array to hold the keys\r\n // Iterate over localStorage and insert the keys that meet the condition into arr\r\n for (let i = 0; i < window.localStorage.length; i++) {\r\n const order = window.localStorage.key(i);\r\n if (order) {\r\n if (order.substring(0, 5) === 'ORDER') {\r\n arr.push(order);\r\n }\r\n }\r\n }\r\n\r\n // Iterate over arr and remove the items by key\r\n for (let i = 0; i < arr.length; i++) {\r\n window.localStorage.removeItem(arr[i]);\r\n }\r\n}\r\n","export function getCurrencyCode(currency: string): string {\r\n if (!currency) {\r\n return '';\r\n }\r\n switch (currency.toUpperCase()) {\r\n case 'SEK':\r\n return ':-';\r\n default:\r\n return '';\r\n }\r\n}\r\n","// Wrapper for the module react-localize-redux\r\n// github: https://github.com/ryandrewjohnson/react-localize-redux/\r\n// Documentation: https://ryandrewjohnson.github.io/react-localize-redux/\r\n\r\nimport {\r\n localeReducer,\r\n LocaleState,\r\n getTranslate as translate,\r\n getActiveLanguage,\r\n} from 'react-localize-redux';\r\n\r\nimport { store } from 'index';\r\n\r\nexport { getTranslate as Translate, localeReducer };\r\n\r\n// wrap getTranslate to avoid error when stepping back in Redux DevTools\r\nexport const getTranslate = (localeState: LocaleState) => {\r\n if (typeof getActiveLanguage(localeState) !== 'undefined') {\r\n return translate(localeState);\r\n }\r\n\r\n let defaultLanguage = store.getState().global.ui.language.code;\r\n\r\n return translate({\r\n languages: [{ name: defaultLanguage, code: defaultLanguage, active: true }],\r\n translations: {},\r\n options: {},\r\n });\r\n};\r\n\r\n// const exampleTranslations = {\r\n// 'MittFriskis': {\r\n// 'Schedule': {\r\n// 'Messages': {\r\n// 'CancellationConfirmation': ['ccc-sv', 'ccc-no', 'ccc-de'],\r\n// 'MaxPassesBooked': ['mpb', 'mpb2', 'mpb3']\r\n// },\r\n// 'ShowFilter': ['show-sv', 'show-no', 'show-de'], // ex: { translate('Schedule.ShowFilter') }\r\n// 'HideFilter': ['hide-sv', 'hide-no', 'hide-de'],\r\n// 'Places': ['places-sv', 'places-no', 'places-de'],\r\n// 'Schedule': ['Schema', 'schedule-no', 'schedule-de']\r\n// },\r\n// 'WeekDays': {\r\n// 'Monday': ['monday-sv', 'monday-no', 'monday-de'],\r\n// 'Tuesday': ['tuesday-sv', 'tuesday-no', 'tuesday-de']\r\n// }\r\n// },\r\n// 'HejNamn': ['Hej ${ namn }', '', ''], // ex: { translate('HejNamn', { namn: 'Testy McTest' }) }\r\n// 'Test': [ // ex: { translate('Test') }\r\n// 'Testtext på svenska (använder translate)',\r\n// 'Testtext på norska',\r\n// 'Testtext på tyska'\r\n// ]\r\n// };\r\n","import { Day } from 'models/Day';\r\nimport { DayViewObject } from 'models/Day';\r\nimport moment from 'moment';\r\n\r\nexport const getListOfUniqueDays = (items: Array): Array> => {\r\n // @Speed blegh\r\n const result: Day[] = [];\r\n (JSON.parse(JSON.stringify(items)) as Array).forEach(\r\n (item: T) => {\r\n const date = new Date(item.StartTime as string);\r\n const i: Day = {\r\n isActive: false,\r\n items: [],\r\n expanded: false,\r\n isExpandable: false,\r\n date,\r\n rawDate: item.StartTime as string,\r\n key: getDateTextForView(item.StartTime as string),\r\n };\r\n if (result.some(r => r.key === i.key)) {\r\n // do nothing\r\n } else {\r\n result.push(i);\r\n }\r\n }\r\n );\r\n return result;\r\n};\r\n\r\nexport function getDateTextForView(startTime: string | Date, format?: string) {\r\n const mDate = moment(startTime, format);\r\n const day = mDate.format('dddd');\r\n const dayMonth = mDate.format('D MMMM');\r\n const upperDay = day.replace(/^\\w/, c => c.toUpperCase());\r\n\r\n return `${upperDay}, ${dayMonth}`;\r\n}\r\n\r\nexport function formatDate(date: string | Date) {\r\n return moment(date).format('L');\r\n}\r\n\r\nexport function getWeekDays() {\r\n return moment.weekdays(true).map(day => day.replace(/^\\w/, c => c.toUpperCase()));\r\n}\r\n\r\nexport function SortIntoDays(items: Array): Array> {\r\n const uniqueDaysArray: Day[] = getListOfUniqueDays(items);\r\n\r\n items.forEach((item, index) => {\r\n const matchingDay = uniqueDaysArray.find(day => day.key === getDateTextForView(item.StartTime as string));\r\n if (matchingDay) {\r\n matchingDay.items.push(item);\r\n }\r\n });\r\n return uniqueDaysArray;\r\n}\r\n\r\nexport function SortSortedIntoDaysViewObject(items: Array>): DayViewObject {\r\n let dayViewObject = {};\r\n items.forEach((day: Day, index) => {\r\n (dayViewObject as any)[day.key] = day;\r\n });\r\n return dayViewObject;\r\n}\r\n","import { ComponentLifecycle } from 'react';\r\n\r\ninterface LastKnownState {\r\n body: {\r\n position: string | null;\r\n height: string | null;\r\n width: string | null;\r\n overflow: string | null;\r\n scrollPosition: number;\r\n };\r\n html: {\r\n position: string | null;\r\n height: string | null;\r\n width: string | null;\r\n overflow: string | null;\r\n };\r\n}\r\n\r\nexport type unlockBackgroundCallback = () => void;\r\n\r\nconst body = document.getElementsByTagName('body')[0];\r\nconst html = document.getElementsByTagName('html')[0];\r\n\r\nfunction lock(): LastKnownState {\r\n const doc = document.documentElement;\r\n const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\r\n const lastKnownState: LastKnownState = {\r\n body: {\r\n position: body.style.position,\r\n height: body.style.height,\r\n width: body.style.width,\r\n overflow: body.style.overflow,\r\n scrollPosition: top || 0,\r\n },\r\n html: {\r\n position: html.style.position,\r\n height: html.style.height,\r\n width: html.style.width,\r\n overflow: html.style.overflow,\r\n },\r\n };\r\n body.style.position = 'relative';\r\n body.style.height = '100%';\r\n body.style.width = '100%';\r\n body.style.overflow = 'hidden';\r\n html.style.position = 'relative';\r\n html.style.height = '100%';\r\n html.style.width = '100%';\r\n html.style.overflow = 'hidden';\r\n return lastKnownState;\r\n}\r\n\r\nfunction unlock(lastKnownState: LastKnownState): void {\r\n if (!lastKnownState) {\r\n body.style.position = 'relative';\r\n body.style.height = 'auto';\r\n body.style.width = 'auto';\r\n body.style.overflow = 'auto';\r\n html.style.position = 'relative';\r\n html.style.height = 'auto';\r\n html.style.width = 'auto';\r\n html.style.overflow = 'hidden';\r\n } else {\r\n body.style.position = lastKnownState.body.position || '';\r\n body.style.height = lastKnownState.body.height || '';\r\n body.style.width = lastKnownState.body.width || '';\r\n body.style.overflow = lastKnownState.body.overflow || '';\r\n if (lastKnownState.body.scrollPosition > 0) {\r\n setTimeout(() => {\r\n if (!!window.scrollTo) {\r\n window.scrollTo(0, lastKnownState.body.scrollPosition);\r\n } else {\r\n window.scroll(0, lastKnownState.body.scrollPosition);\r\n }\r\n // tslint:disable-next-line: align\r\n }, 0);\r\n }\r\n html.style.position = lastKnownState.html.overflow || '';\r\n html.style.height = lastKnownState.html.overflow || '';\r\n html.style.width = lastKnownState.html.overflow || '';\r\n html.style.overflow = lastKnownState.html.overflow || '';\r\n }\r\n}\r\n\r\nfunction willUnmount(lastKnownState: LastKnownState, componentWillUnmount?: () => void): () => void {\r\n return () => {\r\n unlock(lastKnownState);\r\n if (componentWillUnmount) {\r\n componentWillUnmount();\r\n }\r\n };\r\n}\r\n\r\nfunction generateUnlockFunction(lastKnownState: LastKnownState) {\r\n return () => {\r\n unlock(lastKnownState);\r\n };\r\n}\r\n\r\n/**\r\n * En funktion som inaktiverar scroll på HTML och body taggar,\r\n * Användbar när man behöver att visa någon modal, sida eller en popup som täcker hela viewporten och vill att scrollning sker bara i den här delen,\r\n * Denna funktion förändrar componentWillMount funktion om component är inte null för att kunna återställa HTML och body till deras föregående state när den angiven komponent plockas bort ur DOM\r\n * @param component en komponent - React komponent - som implmenenterar ComponentLifecycle interface\r\n * @returns en funktion som kan köras för att låsa upp scroll på HTML och body taggar om component inparameter är null\r\n */\r\nexport function lockBackgroundScroll(component?: ComponentLifecycle<{}, {}>): unlockBackgroundCallback | undefined {\r\n const lastKnownState: LastKnownState = lock();\r\n if (component) {\r\n component.componentWillUnmount = willUnmount(lastKnownState, component.componentWillUnmount);\r\n } else {\r\n return generateUnlockFunction(lastKnownState);\r\n }\r\n return;\r\n}\r\n","import { getTranslate } from 'store/global/dictionary/dictionary';\r\nimport { store } from 'index';\r\nimport { getWeekDays } from 'websd/utils';\r\n\r\nconst bookings = 'Bookings';\r\nconst Bookings = {\r\n Title: `${bookings}.BookingsTitle`,\r\n BookingRulesTitle: `${bookings}.BookingRulesTitle`,\r\n NothingBooked: `${bookings}.NothingBooked`,\r\n};\r\n\r\nconst cart = 'Cart';\r\nconst ssnLookup = `${cart}.SSNLookup`;\r\nconst SSNLookup = {\r\n PersonAlreadyExists: `${ssnLookup}.PersonAlreadyExists`,\r\n PersonNotFound: `${ssnLookup}.PersonNotFound`,\r\n PerfomLookupButtonText: `${ssnLookup}.PerfomLookupButtonText`,\r\n};\r\nconst Cart = {\r\n SSNLookup: SSNLookup,\r\n SubscriptionTermsTitle: `${cart}.SubscriptionTermsTitle`,\r\n EmptyCart: `${cart}.EmptyCart`,\r\n TermsCheckboxTitle: `${cart}.TermsCheckboxTitle`,\r\n IAccept: `${cart}.IAccept`,\r\n TheTerms: `${cart}.TheTerms`,\r\n PaymentInputLabel: `${cart}.PaymentInputLabel`,\r\n ContinueToPayment: `${cart}.ContinueToPayment`,\r\n SSN: `${cart}.SSN`,\r\n BirthDate: `${cart}.BirthDate`,\r\n DebitInfo: `${cart}.DebitInfo`,\r\n HasNoSwedishSSN: `${cart}.HasNoSwedishSSN`,\r\n CouponCodeLabel: `${cart}.CouponCodeLabel`,\r\n CouponCodeTitle: `${cart}.CouponCodeTitle`,\r\n CouponCodeButtonText: `${cart}.CouponCodeButtonText`,\r\n CouponCodePlaceholder: `${cart}.CouponCodePlaceholder`,\r\n CouponCodeInvalid: `${cart}.CouponCodeInvalid`,\r\n FirstName: `${cart}.FirstName`,\r\n LastName: `${cart}.LastName`,\r\n YourProfile: `${cart}.YourProfile`,\r\n FavouriteBusinessUnitTitle: `${cart}.FavouriteBusinessUnitTitle`,\r\n FavouriteBusinessUnitDefault: `${cart}.FavouriteBusinessUnitDefault`,\r\n FavouriteBusinessUnitDescription: `${cart}.FavouriteBusinessUnitDescription`,\r\n CartName: `${cart}.CartName`,\r\n Email: `${cart}.Email`,\r\n TelephoneNumber: `${cart}.TelephoneNumber`,\r\n Street: `${cart}.Street`,\r\n ZipCode: `${cart}.ZipCode`,\r\n City: `${cart}.City`,\r\n\r\n Facility: `${cart}.Facility`,\r\n FacilityExplanation: `${cart}.FacilityExplanation`,\r\n\r\n PaymentMethodsTitle: `${cart}.PaymentMethodsTitle`,\r\n PaymentMethodsAutogiroExtraInfo: `${cart}.PaymentMethodsAutogiroExtraInfo`,\r\n PickPaymentMethod: `${cart}.PickPaymentMethod`,\r\n PhoneNumberLabel: `${cart}.PhoneNumberLabel`,\r\n PaymentMethodBank: `${cart}.PaymentMethodBank`,\r\n PaymentMethodCard: `${cart}.PaymentMethodCard`,\r\n PaymentMethodSwish: `${cart}.PaymentMethodSwish`,\r\n\r\n // Placeholders\r\n SSNPlaceholder: `${cart}.SSNPlaceholder`,\r\n SSNPlaceholderNoSwedishSSN: `${cart}.SSNPlaceholderNoSwedishSSN`,\r\n FirstNamePlaceholder: `${cart}.FirstNamePlaceholder`,\r\n LastNamePlaceholder: `${cart}.LastNamePlaceholder`,\r\n EmailPlaceholder: `${cart}.EmailPlaceholder`,\r\n StreetPlaceholder: `${cart}.StreetPlaceholder`,\r\n TelephonePlaceholder: `${cart}.TelephonePlaceholder`,\r\n FacilityInput: `${cart}.FacilityPlaceholder`,\r\n PhoneNumberPlaceholder: `${cart}.PhoneNumberPlaceholder`,\r\n PaymentMethodPlaceholder: `${cart}.PaymentMethodPlaceholder`,\r\n\r\n // Titles\r\n AccountTitle: `${cart}.AccountTitle`,\r\n TotalToPay: `${cart}.TotalToPay`,\r\n\r\n // Messages\r\n INVALID_ADDRESS: `${cart}.INVALID_ADDRESS`,\r\n PERSONNR_WRONG_FORMAT: `${cart}.SNNWrongFormat`,\r\n PERSONNR_ALREADY_EXISTS: `${cart}.SNNAlreadyExists`,\r\n EPOST_ALREADY_EXISTS: `${cart}.EpostAlreadyExists`,\r\n EPOST_NOT_VALID: `${cart}.EpostNotValid`,\r\n INVALID_INPUT: `${cart}.InvalidInput`,\r\n UNKNOWN_ERROR: `${cart}.UnknownError`,\r\n UserAlreadyExistsInMittFriskis: `${cart}.UserAlreadyExistsInMittFriskis`,\r\n SSN_INVALID_SE: `${cart}.SNNWrongFormat`,\r\n ADDRESS_INVALID_POSTALCODE: `${cart}.INVALID_ADDRESS`,\r\n\r\n // SSN lookup\r\n};\r\n\r\nconst common = 'Common';\r\n\r\nconst newPasswordField = `${common}.NewPasswordField`;\r\nconst NewPasswordField = {\r\n NewPasswordRules: `${newPasswordField}.NewPasswordRules`,\r\n Password: `${newPasswordField}.Password`,\r\n PasswordPlaceholder: `${newPasswordField}.PasswordPlaceholder`,\r\n RepeatPassword: `${newPasswordField}.RepeatPassword`,\r\n RepeatPasswordPlaceholder: `${newPasswordField}.RepeatPasswordPlaceholder`,\r\n};\r\n\r\nconst Common = {\r\n Back: `${common}.Back`,\r\n Continue: `${common}.Continue`,\r\n Hide: `${common}.Hide`,\r\n No: `${common}.No`,\r\n Cancel: `${common}.Cancel`,\r\n Save: `${common}.Save`,\r\n Show: `${common}.Show`,\r\n Yes: `${common}.Yes`,\r\n SavingSucceed: `${common}.SavingSucceed`,\r\n SavingFailed: `${common}.SavingFailed`,\r\n BackToProducts: `${common}.BackToProducts`,\r\n NewPasswordField,\r\n};\r\n\r\nconst facilities = 'Facilities';\r\nconst Facilities = {\r\n Open: `${facilities}.Open`,\r\n OpenTomorrow: `${facilities}.OpenTomorrow`,\r\n CloseTomorrow: `${facilities}.CloseTomorrow`,\r\n OpenReception: `${facilities}.OpenReception`,\r\n OpenReceptionTomorrow: `${facilities}.OpenReceptionTomorrow`,\r\n OpenLater: `${facilities}.OpenLater`,\r\n OpenReceptionLater: `${facilities}.OpenReceptionLater`,\r\n ExceptionalOpenTimes: `${facilities}.ExceptionalOpenTimes`,\r\n Closed: `${facilities}.Closed`,\r\n};\r\n\r\nconst gdpr = 'GDPR';\r\nconst GDPR = {\r\n GDPR: `${gdpr}.GDPR`,\r\n TermsCheckBoxTitleGDPR: `${gdpr}.TermsCheckBoxTitleGDPR`,\r\n GDRPTitle: `${gdpr}.GDPRTitle`,\r\n};\r\n\r\nconst settings = 'Settings';\r\nconst Settings = {\r\n Banner: `${settings}.Banner`,\r\n};\r\n\r\nconst login = 'Login';\r\nconst loginMessages = `${login}.Messages`;\r\nconst LoginMessages = {\r\n InvalidCredentials: `${loginMessages}.InvalidCredentials`,\r\n};\r\nconst Login = {\r\n Email: `${login}.Email`,\r\n EmailPlaceholder: `${login}.EmailPlaceholder`,\r\n Foerening: `${login}.Foerening`,\r\n ForgotPassword: `${login}.ForgotPassword`,\r\n Login: `${login}.Login`,\r\n Password: `${login}.Password`,\r\n PasswordPlaceholder: `${login}.PasswordPlaceholder`,\r\n SelectFoerening: `${login}.SelectFoerening`,\r\n Messages: LoginMessages,\r\n GoBack: `${login}.GoBack`,\r\n Hi: `${login}.Hi`,\r\n WhoYouAre: `${login}.WhoYouAre`,\r\n IdentifyYourSelf: `${login}.IdentifyYourSelf`,\r\n PromptTitle: `${login}.PromptTitle`,\r\n PromptDescription: `${login}.PromptDescription`,\r\n PromptLoginDescription: `${login}.PromptLoginDescription`,\r\n PromptSignUpDescription: `${login}.PromptSignUpDescription`,\r\n PromptSignUpButton: `${login}.PromptSignUpButton`,\r\n FoereningSelectMessage: `${login}.FoereningSelectMessage`,\r\n};\r\n\r\nconst paymentErrorMessages = 'PaymentErrorMessages';\r\nconst brpPaymentErrorMessages = `${paymentErrorMessages}.BRP`;\r\nconst pastellDataPaymentErrorMessages = `${paymentErrorMessages}.PastellData`;\r\nconst createPaymentErrorMessages = `${paymentErrorMessages}.Create`;\r\nconst PaymentErrorMessages = {\r\n BRP: {\r\n f10: `${brpPaymentErrorMessages}.f10`,\r\n f101: `${brpPaymentErrorMessages}.f101`,\r\n f102: `${brpPaymentErrorMessages}.f102`,\r\n f103: `${brpPaymentErrorMessages}.f103`,\r\n f104: `${brpPaymentErrorMessages}.f104`,\r\n f105: `${brpPaymentErrorMessages}.f105`,\r\n f106: `${brpPaymentErrorMessages}.f106`,\r\n f107: `${brpPaymentErrorMessages}.f107`,\r\n f110: `${brpPaymentErrorMessages}.f110`,\r\n f13: `${brpPaymentErrorMessages}.f13`,\r\n f14: `${brpPaymentErrorMessages}.f14`,\r\n f15: `${brpPaymentErrorMessages}.f15`,\r\n f200: `${brpPaymentErrorMessages}.f200`,\r\n f201: `${brpPaymentErrorMessages}.f201`,\r\n f202: `${brpPaymentErrorMessages}.f202`,\r\n f203: `${brpPaymentErrorMessages}.f203`,\r\n f204: `${brpPaymentErrorMessages}.f204`,\r\n f205: `${brpPaymentErrorMessages}.f205`,\r\n f206: `${brpPaymentErrorMessages}.f206`,\r\n f207: `${brpPaymentErrorMessages}.f207`,\r\n f9: `${brpPaymentErrorMessages}.f9`,\r\n },\r\n PastellData: {\r\n CANCEL: `${pastellDataPaymentErrorMessages}.CANCEL`,\r\n ERROR: `${pastellDataPaymentErrorMessages}.ERROR`,\r\n },\r\n GeneralError: `${paymentErrorMessages}.GeneralError`,\r\n CreatePaymentErrorMessages: {\r\n Autogiro: `${createPaymentErrorMessages}.Autogiro`,\r\n },\r\n};\r\n\r\nconst mainMenu = 'MainMenu';\r\nconst MainMenu = {\r\n Bookings: `${mainMenu}.Bookings`,\r\n Facilities: `${mainMenu}.Facilities`,\r\n Friskis: `${mainMenu}.Friskis`,\r\n GoToPublicWeb: `${mainMenu}.GoToPublicWeb`,\r\n Me: `${mainMenu}.Me`,\r\n News: `${mainMenu}.News`,\r\n Notifications: `${mainMenu}.Notifications`,\r\n Schedule: `${mainMenu}.Schedule`,\r\n Settings: `${mainMenu}.Settings`,\r\n Subscriptions: `${mainMenu}.Subscriptions`,\r\n TrainingStatistics: `${mainMenu}.TrainingStatistics`,\r\n OnlineTraining: `${mainMenu}.OnlineTraining`,\r\n};\r\n\r\nconst profile = 'Profile';\r\n\r\nconst profileMenu = `${profile}.Menu`;\r\nconst ProfileMenu = {\r\n CalendarSyncText: `${profileMenu}.CalendarSyncText`,\r\n CalendarSyncTitle: `${profileMenu}.CalendarSyncTitle`,\r\n NotificationSettingsText: `${profileMenu}.NotificationSettingsText`,\r\n NotificationSettingsTitle: `${profileMenu}.NotificationSettingsTitle`,\r\n PaymentsText: `${profileMenu}.PaymentsText`,\r\n PaymentsTitle: `${profileMenu}.PaymentsTitle`,\r\n ProfileText: `${profileMenu}.ProfileText`,\r\n ProfileLongText: `${profileMenu}.ProfileLongText`,\r\n ProfileTitle: `${profileMenu}.ProfileTitle`,\r\n TrainingPreferencesText: `${profileMenu}.TrainingPreferencesText`,\r\n TrainingPreferencesTitle: `${profileMenu}.TrainingPreferencesTitle`,\r\n UserAccountText: `${profileMenu}.UserAccountText`,\r\n UserAccountTitle: `${profileMenu}.UserAccountTitle`,\r\n};\r\n\r\nconst userAccount = `UserAccount`;\r\nconst UserAccount = {\r\n ChangePassword: `${userAccount}.ChangePassword`,\r\n ChangePasswordTitle: `${userAccount}.ChangePasswordTitle`,\r\n EnterCurrentPassword: `${userAccount}.EnterCurrentPassword`,\r\n EnterCurrentPasswordPlaceHolder: `${userAccount}.EnterCurrentPasswordPlaceHolder`,\r\n RepeatPassword: `${userAccount}.RepeatPassword`,\r\n Title: `${userAccount}.Title`,\r\n PasswordChangedSuccessfully: `${userAccount}.PasswordChangedSuccessfully`,\r\n PasswordChangeFailed: `${userAccount}.PasswordChangeFailed`,\r\n};\r\n\r\nconst paymentSettings = `${profile}.PaymentSettings`;\r\nconst PaymentSettings = {\r\n Account: `${paymentSettings}.Account`,\r\n Autogiro: `${paymentSettings}.Autogiro`,\r\n Avtalegiro: `${paymentSettings}.Avtalegiro`,\r\n Card: `${paymentSettings}.Card`,\r\n Information: `${paymentSettings}.Information`,\r\n NoRegisteredPayments: `${paymentSettings}.NoRegisteredPayments`,\r\n PaymentSettings: `${paymentSettings}.PaymentSettings`,\r\n TerminateInformation: `${paymentSettings}.TerminateInformation`,\r\n TerminateInformationWhenEnabled: `${paymentSettings}.TerminateInformationWhenEnabled`,\r\n AccountNumber: `${paymentSettings}.AccountNumber`,\r\n ClearingNumber: `${paymentSettings}.ClearingNumber`,\r\n DebitDetails: `${paymentSettings}.DebitDetails`,\r\n UpdateBankAccount: `${paymentSettings}.UpdateBankAccount`,\r\n INVALID_INPUT: `${paymentSettings}.InvalidInput`,\r\n UNKNOWN_ERROR: `${paymentSettings}.UnknownError`,\r\n};\r\n\r\nconst sectionDescription = `${profile}.SectionDescription`;\r\nconst SectionDescription = {\r\n Profile: `${sectionDescription}.Profile`,\r\n Account: `${sectionDescription}.Account`,\r\n PaymentMethods: `${sectionDescription}.PaymentMethods`,\r\n NotificationsSettings: `${sectionDescription}.NotificationsSettings`,\r\n TrainingPreferences: `${sectionDescription}.TrainingPreferences`,\r\n};\r\n\r\nconst calendarSync = `${profile}.CalendarSync`;\r\nconst CalendarSync = {\r\n Title: `${calendarSync}.Title`,\r\n Text: `${calendarSync}.Text`,\r\n PickCalendar: `${calendarSync}.PickCalendar`,\r\n};\r\n\r\nconst Profile = {\r\n Logout: `${profile}.Logout`,\r\n Login: `${profile}.Login`,\r\n Address: `${profile}.Address`,\r\n City: `${profile}.City`,\r\n Email: `${profile}.Email`,\r\n Firstname: `${profile}.Firstname`,\r\n Lastname: `${profile}.Lastname`,\r\n Phonenumber: `${profile}.Phonenumber`,\r\n ZipCode: `${profile}.ZipCode`,\r\n RequiredFieldError: `${profile}.RequiredFieldError`,\r\n FieldAcceptOnlyChars: `${profile}.FieldAcceptOnlyChars`,\r\n InvalidEmail: `${profile}.InvalidEmail`,\r\n InvalidZipCode: `${profile}.InvalidZipCode`,\r\n InvalidTelNumber: `${profile}.InvalidTelNumber`,\r\n MustSaveBeforeContinue: `${profile}.MustSaveBeforeContinue`,\r\n EmailAlreadyExists: `${profile}.EmailAlreadyExists`,\r\n Menu: ProfileMenu,\r\n PaymentSettings: PaymentSettings,\r\n SectionDescription,\r\n CalendarSync,\r\n};\r\n\r\nconst scheduleBookingStatus = 'Schedule.BookingStatus';\r\nconst ScheduleBookingStatus = {\r\n EJ_BOKNINGSBART_DATE: `${scheduleBookingStatus}.EJ_BOKNINGSBART_DATE`,\r\n EJ_BOKNINGSBART_DATE_DROPIN: `${scheduleBookingStatus}.EJ_BOKNINGSBART_DATE_DROPIN`,\r\n FOERSENT_FOER_ATT_BOKA: `${scheduleBookingStatus}.FOERSENT_FOER_ATT_BOKA`,\r\n FOERTIDIGT_FOER_ATT_BOKA: `${scheduleBookingStatus}.FOERTIDIGT_FOER_ATT_BOKA`,\r\n BOKNINGSBART: `${scheduleBookingStatus}.BOKNINGSBART`,\r\n BOKNINGSBART_DROPIN: `${scheduleBookingStatus}.BOKNINGSBART_DROPIN`,\r\n BOKNINGSBART_KOE: `${scheduleBookingStatus}.BOKNINGSBART_KOE`,\r\n BOKNINGSBART_KOE_DROPIN: `${scheduleBookingStatus}.BOKNINGSBART_KOE_DROPIN`,\r\n KOEPLATS: `${scheduleBookingStatus}.KOEPLATS`,\r\n KOEPLATS_DROPIN: `${scheduleBookingStatus}.KOEPLATS_DROPIN`,\r\n FULLT: `${scheduleBookingStatus}.FULLT`,\r\n FULLT_DROPIN: `${scheduleBookingStatus}.FULLT_DROPIN`,\r\n DROPIN: `${scheduleBookingStatus}.DROPIN`,\r\n INSTAELLD: `${scheduleBookingStatus}.INSTAELLD`,\r\n};\r\n\r\nconst scheduleDayPeriods = 'Schedule.DayPeriods';\r\nconst ScheduleDayPeriods = {\r\n Morning: `${scheduleDayPeriods}.Morning`,\r\n Midmorning: `${scheduleDayPeriods}.Midmorning`,\r\n Lunch: `${scheduleDayPeriods}.Lunch`,\r\n Afternoon: `${scheduleDayPeriods}.Afternoon`,\r\n Evening: `${scheduleDayPeriods}.Evening`,\r\n};\r\n\r\nconst scheduleMessages = 'Schedule.Messages';\r\nconst ScheduleMessages = {\r\n ALREADY_BOOKED: `${scheduleMessages}.AlreadyBooked`,\r\n ALREADY_ON_WAITINGLIST: `${scheduleMessages}.AlreadyOnWaitingList`,\r\n BOOKING_CLASHES_WITH_OTHER_BOOKING: `${scheduleMessages}.BookingClashesWithOtherBooking`,\r\n CANCELLATION_CONFIRMATION: `${scheduleMessages}.CancellationConfirmation`,\r\n CANCELLATION_OK: `${scheduleMessages}.CancellationOk`,\r\n CANCELLED: `${scheduleMessages}.Cancelled`,\r\n NO_FREE_SLOTS_AVAILABLE: `${scheduleMessages}.NoFreeSlotsAvailable`,\r\n OK_BOOK: `${scheduleMessages}.OkBook`,\r\n OK_CANCEL: `${scheduleMessages}.OkCancel`,\r\n PassAddedToCalendar: `${scheduleMessages}.PassAddedToCalendar`,\r\n PassCanceled: `${scheduleMessages}.PassCanceled`,\r\n QUEUED: `${scheduleMessages}.Queued`,\r\n QueuePlaceNotification: `${scheduleMessages}.QueuePlaceNotification`,\r\n TOO_LATE_TO_BOOK: `${scheduleMessages}.TooLateToBook`,\r\n TOO_LATE_TO_CANCEL: `${scheduleMessages}.TooLateToCancel`,\r\n TOO_MANY_CONCURRENT_BOOKINGS: `${scheduleMessages}.TooManyConcurrentBookings`,\r\n TOO_MANY_CONCURRENT_WAITINGLISTS: `${scheduleMessages}.TooManyConcurrentWaitingLists`,\r\n TOO_MANY_NO_SHOWS: `${scheduleMessages}.TooManyNoShows`,\r\n UNKNOWN_ERROR: `${scheduleMessages}.UnknownError`,\r\n UNKNOWN_ERROR_CANCEL: `${scheduleMessages}.UnknownErrorCancel`,\r\n MISSING_PRIVILEGE: `${scheduleMessages}.MissingPrivilege`,\r\n NOT_OPEN_FOR_BOOKING: `${scheduleMessages}.NotOpenForBooking`,\r\n BOOKING_TERMS_NOT_ACCEPTED: `${scheduleMessages}.BookingTermsNotAccepted`,\r\n BOOKING_REQUIRES_MEMBERSHIP: `${scheduleMessages}.BookingRequiresMembership`,\r\n BOOKING_RESOURCE_REQUIREMENT_HAS_CHANGED: `${scheduleMessages}.BookingResourceRequirementHasChanged`,\r\n BOOKING_RULE_PREVENTS_ADDING_TO_WAITING_LIST: `${scheduleMessages}.BookingRulePreventsAddingToWaitingList`,\r\n BOOKING_RULE_PREVENTS_BOOKING: `${scheduleMessages}.BookingRulePreventsBooking`,\r\n BOOKING_WAITING_LIST_NOT_ALLOWED_IF_FREE_SLOTS: `${scheduleMessages}.BookingWaitingListNotAllowedIfFreeSlot`,\r\n BOOK_EVENT_INSUFFICIENT_SLOTS: `${scheduleMessages}.BookEventInsufficientSlots`,\r\n BOOK_EVENT_NOT_IN_BOOKING_PERIOD: `${scheduleMessages}.BookEventNotInBookingPeriod`,\r\n BOOK_SERVICE_INSUFFICIENT_RIGHTS: `${scheduleMessages}.BookServiceInsufficientRights`,\r\n CANNOT_BOOK_CANCELLED_ACTIVITY: `${scheduleMessages}.CannotBookCancelledActivity`,\r\n TOO_EARLY_TO_BOOK: `${scheduleMessages}.TooEarlyToBook`,\r\n NO_FREE_RESOURCES_AVAILABLE: `${scheduleMessages}.NoFreeResourcesAvailable`,\r\n UNPAID_INVOICES_EXIST: `${scheduleMessages}.UnpaidInvoicesExist`,\r\n};\r\n\r\nconst scheduleFilterCategoriesBase = 'Schedule.Filter.Categories';\r\nconst ScheduleFilterCategories = {\r\n Bokningsstatus: `${scheduleFilterCategoriesBase}.Bokningsstatus`,\r\n Favoritfilter: `${scheduleFilterCategoriesBase}.Favoritfilter`,\r\n LedareOrTraenare: `${scheduleFilterCategoriesBase}.LedareOrTraenare`,\r\n Tidpunkt: `${scheduleFilterCategoriesBase}.Tidpunkt`,\r\n Traeningspass: `${scheduleFilterCategoriesBase}.Traeningspass`,\r\n Traeningsstaelle: `${scheduleFilterCategoriesBase}.Traeningsstaelle`,\r\n Veckodag: `${scheduleFilterCategoriesBase}.Veckodag`,\r\n};\r\n\r\nconst scheduleFilter = 'Schedule.Filter';\r\nconst ScheduleFilter = {\r\n Bokningsstatusar: {},\r\n Categories: ScheduleFilterCategories,\r\n ClearFilter: `${scheduleFilter}.ClearFilter`,\r\n DeleteFilterConfirm: `${scheduleFilter}.DeleteFilterConfirm`,\r\n HideFilter: `${scheduleFilter}.HideFilter`,\r\n NameFilter: `${scheduleFilter}.NameFilter`,\r\n QuickSearchPlaceholder: `${scheduleFilter}.QuickSearchPlaceholder`,\r\n DeleteFilter: `${scheduleFilter}.DeleteFilter`,\r\n NameFilterTitle: `${scheduleFilter}.NameFilterTitle`,\r\n SaveFilter: `${scheduleFilter}.SaveFilter`,\r\n SavedFilters: `${scheduleFilter}.SavedFilters`,\r\n SearchWithFreeText: `${scheduleFilter}.SearchWithFreeText`,\r\n ShowFilter: `${scheduleFilter}.ShowFilter`,\r\n EditFilter: `${scheduleFilter}.EditFilter`,\r\n FilterHasNoHits: `${scheduleFilter}.FilterHasNoHits`,\r\n MaxNumberOfItemsExceeded: `${scheduleFilter}.MaxNumberOfItemsExceeded`,\r\n SelectAllInCategory: `${scheduleFilter}.SelectAllInCategory`,\r\n MustPickOneGymTitle: `${scheduleFilter}.MustPickOneGymTitle`,\r\n MustPickOneGymButton: `${scheduleFilter}.MustPickOneGymButton`,\r\n MustPickOneGymTitlePublicSchedule: `${scheduleFilter}.MustPickOneGymTitlePublicSchedule`,\r\n MustPickOneGymButtonPublicSchedule: `${scheduleFilter}.MustPickOneGymButtonPublicSchedule`,\r\n MustPickOneGymTitleSchedule: `${scheduleFilter}.MustPickOneGymTitleSchedule`,\r\n MustPickOneGymButtonSchedule: `${scheduleFilter}.MustPickOneGymButtonSchedule`,\r\n};\r\n\r\nconst scheduleView = 'Schedule.View';\r\nconst ScheduleView = {\r\n ListView: `${scheduleView}.ListView`,\r\n WeekView: `${scheduleView}.WeekView`,\r\n};\r\n\r\nconst schedulePublicWeb = 'Schedule.PublicWeb';\r\nconst SchedulePublicWeb = {\r\n Bookings: `${schedulePublicWeb}.Bookings`,\r\n CancelBookings: `${schedulePublicWeb}.CancelBookings`,\r\n Hello: `${schedulePublicWeb}.Hello`,\r\n Identify: `${schedulePublicWeb}.Identify`,\r\n Info: `${schedulePublicWeb}.Info`,\r\n MittFriskisHeader: `${schedulePublicWeb}.MittFriskisHeader`,\r\n MittFriskisLink: `${schedulePublicWeb}.MittFriskisLink`,\r\n SaveFilter: `${schedulePublicWeb}.SaveFilter`,\r\n TrainingStatistics: `${schedulePublicWeb}.TrainingStatistics`,\r\n};\r\n\r\nconst schedule = 'Schedule';\r\nconst Schedule = {\r\n BookingRules: `${schedule}.BookingRules`,\r\n BookingRulesFor: `${schedule}.BookingRulesFor`,\r\n BookingStatus: ScheduleBookingStatus,\r\n DayPeriods: ScheduleDayPeriods,\r\n Filter: ScheduleFilter,\r\n Messages: ScheduleMessages,\r\n View: ScheduleView,\r\n ConfirmBook: `${schedule}.ConfirmBook`,\r\n ConfirmCancel: `${schedule}.ConfirmCancel`,\r\n HideFilter: `${schedule}.HideFilter`,\r\n Places: `${schedule}.Places`,\r\n QueuePosition: `${schedule}.QueuePosition`,\r\n Schedule: `${schedule}.Schedule`,\r\n ShowFilter: `${schedule}.ShowFilter`,\r\n ShowRules: `${schedule}.ShowRules`,\r\n ListView: `${schedule}.ListView`,\r\n WeekView: `${schedule}.WeekView`,\r\n PublicWeb: SchedulePublicWeb,\r\n PullToRefresh: `${schedule}.PullToRefresh`,\r\n ReleaseToRefresh: `${schedule}.ReleaseToRefresh`,\r\n Refreshing: `${schedule}.Refreshing`,\r\n};\r\n\r\nconst signing = 'Signing';\r\nconst Signing = {\r\n SignatureCaseNotSigned: `${signing}.SignatureCaseNotSigned`,\r\n SignatureCaseSigned: `${signing}.SignatureCaseSigned`,\r\n SigningName: `${signing}.SigningName`,\r\n SigningTitle: `${signing}.SigningTitle`,\r\n SigningTitleAllSigned: `${signing}.SigningTitleAllSigned`,\r\n SigningTitleDirectDebit: `${signing}.SigningTitleDirectDebit`,\r\n SigningTitleMembership: `${signing}.SigningTitleMembership`,\r\n};\r\n\r\nconst shop = 'Shop';\r\nconst shopFilter = `${shop}.Filter`;\r\nconst adminShop = `${shop}.Admin`;\r\nconst shopFilterCategories = `${shopFilter}.Categories`;\r\nconst shopFilterCategoryValues = `${shop}.Filter.CategoryValues`;\r\nconst ShopFilterCategoryValues = {\r\n ProductHow: {\r\n DIRECT_DEBIT_NO: `${shopFilterCategoryValues}.ProductHow.DIRECT_DEBIT_NO`,\r\n DIRECT_DEBIT_SE: `${shopFilterCategoryValues}.ProductHow.DIRECT_DEBIT_SE`,\r\n MANUAL_DEBIT: `${shopFilterCategoryValues}.ProductHow.MANUAL_DEBIT`,\r\n RECURRING_CARD_PAYMENT: `${shopFilterCategoryValues}.ProductHow.RECURRING_CARD_PAYMENT`,\r\n },\r\n ProductWhen: {\r\n Dag: `${shopFilterCategoryValues}.ProductWhen.Dag`,\r\n DygnetRunt: `${shopFilterCategoryValues}.ProductWhen.DygnetRunt`,\r\n },\r\n ProductWho: {\r\n Pensionar: `${shopFilterCategoryValues}.ProductWho.Pensionar`,\r\n Student: `${shopFilterCategoryValues}.ProductWho.Student`,\r\n Tonaring: `${shopFilterCategoryValues}.ProductWho.Tonaring`,\r\n Vuxen: `${shopFilterCategoryValues}.ProductWho.Vuxen`,\r\n },\r\n};\r\n\r\nconst AdminShop = {\r\n ShopNotAvailableForAdminTitle: `${adminShop}.ShopNotAvailableForAdminTitle`,\r\n ShopNotAvailableForAdminText: `${adminShop}.ShopNotAvailableForAdminText`,\r\n ShopNotAvailableForAdminReturnButtonText: `${adminShop}.ShopNotAvailableForAdminReturnButtonText`,\r\n CannotPurchaseInAdminShop: `${adminShop}.CannotPurchaseInAdminShop`,\r\n ProductNotFound: `${adminShop}.ProductNotFound`,\r\n};\r\n\r\nconst ShopFilter = {\r\n Intro: `${shopFilter}.Intro`,\r\n Categories: {\r\n ProductHow: `${shopFilterCategories}.ProductHow`,\r\n ProductWhen: `${shopFilterCategories}.ProductWhen`,\r\n ProductWhere: `${shopFilterCategories}.ProductWhere`,\r\n ProductWho: `${shopFilterCategories}.ProductWho`,\r\n },\r\n CategoryValues: ShopFilterCategoryValues,\r\n TwoBusinessUnitsCardTitle: `${shopFilter}.TwoBusinessUnitsCardTitle`,\r\n TwoBusinessUnitsCardDescription: `${shopFilter}.TwoBusinessUnitsCardDescription`,\r\n NationalCardTitle: `${shopFilter}.NationalCardTitle`,\r\n NationalCardDescription: `${shopFilter}.NationalCardDescription`,\r\n};\r\n\r\nconst Shop = {\r\n RecommendedProducts: `${shop}.RecommendedProducts`,\r\n ShopName: `${shop}.ShopName`,\r\n RegisterName: `${shop}.RegisterName`,\r\n // Filter\r\n Filter: ShopFilter,\r\n AddToBasket: `${shop}.AddToBasket`,\r\n CannotBuyProduct: `${shop}.CannotBuyProduct`,\r\n GoBackToPublicSite: `${shop}.GoBackToPublicSite`,\r\n TwoBusinessUnitCard: `${shop}.TwoBusinessUnitCard`,\r\n NationalCard: `${shop}.NationalCard`,\r\n TrainingCardTabsTitle: `${shop}.TrainingCardTabsTitle`,\r\n AllProducts: `${shop}.AllProducts`,\r\n ExactHits: `${shop}.ExactHits`,\r\n OtherHits: `${shop}.OtherHits`,\r\n NoExactHits: `${shop}.NoExactHits`,\r\n\r\n // Public Shop\r\n PublicShopBannerTitle: `${shop}.PublicShopBannerTitle`,\r\n PublicShopBannerText: `${shop}.PublicShopBannerText`,\r\n PublicShopCoreBannerTitle: `${shop}.PublicShopCoreBannerTitle`,\r\n PublicShopCoreBannerText: `${shop}.PublicShopCoreBannerText`,\r\n PublicShopSelectionDefault: `${shop}.PublicShopSelectionDefault`,\r\n\r\n MembershipTitle: `${shop}.MembershipTitle`,\r\n MembershipDescription: `${shop}.MembershipDescription`,\r\n AddedMembershipToBasket: `${shop}.AddedMembershipToBasket`,\r\n NoProductsFoundFromFilter: `${shop}.NoProductsFoundFromFilter`,\r\n\r\n ProductAddedToBasket: `${shop}.ProductAddedToBasket`,\r\n ProductExistsInBasket: `${shop}.ProductExistsInBasket`,\r\n CanOnlyAddOneOfTypeTraeningsKort: `${shop}.CanOnlyAddOneOfTypeTraeningsKort`,\r\n\r\n ShopNotAvailableTitle: `${shop}.ShopNotAvailableTitle`,\r\n ShopNotAvailableText: `${shop}.ShopNotAvailableText`,\r\n ShopNotAvailableReturnButtonText: `${shop}.ShopNotAvailableReturnButtonText`,\r\n\r\n Admin: AdminShop,\r\n\r\n DisplayProducts: `${shop}.DisplayProducts`,\r\n HideProducts: `${shop}.HideProducts`,\r\n};\r\n\r\nconst startPage = 'StartPage';\r\n\r\nconst startPageDesktopMenu = `${startPage}.DesktopMenu`;\r\nconst startPageDesktopMenuTitles = {\r\n Bookings: `${startPageDesktopMenu}.Bookings`,\r\n Facilities: `${startPageDesktopMenu}.Facilities`,\r\n News: `${startPageDesktopMenu}.News`,\r\n Notifications: `${startPageDesktopMenu}.Notifications`,\r\n Subsctiptions: `${startPageDesktopMenu}.Subscriptions`,\r\n TrainingStatistics: `${startPageDesktopMenu}.TrainingStatistics`,\r\n};\r\n\r\nconst StartPage = {\r\n NextPass: `${startPage}.NextPass`,\r\n NoBookedPassTitle: `${startPage}.NoBookedPassTitle`,\r\n NoBookedPassText: `${startPage}.NoBookedPassText`,\r\n OpenSchema: `${startPage}.OpenSchema`,\r\n ShowBokningar: `${startPage}.ShowBokningar`,\r\n Greetings: `${startPage}.Greetings`,\r\n Menu: startPageDesktopMenuTitles,\r\n};\r\n\r\nconst statistics = 'TrainingStatistics';\r\nconst Statistics = {\r\n ActivityTypesLast30Days: `${statistics}.ActivityTypesLast30Days`,\r\n WorkoutsLastMonth: `${statistics}.WorkoutsLastMonth`,\r\n WorkoutsLastWeek: `${statistics}.WorkoutsLastWeek`,\r\n WorkoutsLastYear: `${statistics}.WorkoutsLastYear`,\r\n WorkoutsPerMonth: `${statistics}.WorkoutsPerMonth`,\r\n WorkoutsPerWeek: `${statistics}.WorkoutsPerWeek`,\r\n WorkoutsPerYear: `${statistics}.WorkoutsPerYear`,\r\n WorkoutsThisMonth: `${statistics}.WorkoutsThisMonth`,\r\n WorkoutsThisWeek: `${statistics}.WorkoutsThisWeek`,\r\n WorkoutsThisYear: `${statistics}.WorkoutsThisYear`,\r\n DefaultValueGym: `${statistics}.DefaultValueGym`,\r\n};\r\n\r\nconst subscriptionsAndCards = 'SubscriptionsAndCards';\r\n\r\nconst subscriptionsAndCardsMessages = `${subscriptionsAndCards}.Messages`;\r\nconst SubscriptionsAndCardsMessages = {\r\n ALREADY_TERMINATED: `${subscriptionsAndCardsMessages}.AlreadyTerminated`,\r\n CANNOT_TERMINATE_SUBSCRIPTION: `${subscriptionsAndCardsMessages}.CannotTerminateSubscription`,\r\n FAILED_TO_TERMINATE: `${subscriptionsAndCardsMessages}.FailedToTerminate`,\r\n UNKNOWN_ERROR: `${subscriptionsAndCardsMessages}.UnknownError`,\r\n OK: `${subscriptionsAndCardsMessages}.OkTerminate`,\r\n};\r\n\r\nconst SubscriptionsAndCards = {\r\n BannerText: `${subscriptionsAndCards}.BannerText`,\r\n BuyMore: `${subscriptionsAndCards}.BuyMore`,\r\n CardHasExpired: `${subscriptionsAndCards}.CardHasExpired`,\r\n ConfirmTerminateSubscription: `${subscriptionsAndCards}.ConfirmTerminateSubscription`,\r\n Extend: `${subscriptionsAndCards}.Extend`,\r\n Membership: `${subscriptionsAndCards}.Membership`,\r\n NumberOfUnitsLeft: `${subscriptionsAndCards}.NumberOfUnitsLeft`,\r\n Renew: `${subscriptionsAndCards}.Renew`,\r\n ShopButton: `${subscriptionsAndCards}.ShopButton`,\r\n TrainingCards: `${subscriptionsAndCards}.TrainingCards`,\r\n SubscriptionReceipts: `${subscriptionsAndCards}.SubscriptionReceipts`,\r\n Valid: `${subscriptionsAndCards}.Valid`,\r\n ValidFrom: `${subscriptionsAndCards}.ValidFrom`,\r\n ValidUntil: `${subscriptionsAndCards}.ValidUntil`,\r\n ValidBetween: `${subscriptionsAndCards}.ValidBetween`,\r\n BoundUntil: `${subscriptionsAndCards}.BoundUntil`,\r\n MembershipHasExpired: `${subscriptionsAndCards}.MembershipHasExpired`,\r\n ProductNotFound: `${subscriptionsAndCards}.ProductNotFound`,\r\n Messages: SubscriptionsAndCardsMessages,\r\n Terminated: `${subscriptionsAndCards}.Terminated`,\r\n};\r\n\r\nconst medlemsVillkor = 'MedlemsVillkor';\r\nconst MedlemsVillkor = {\r\n HasNoMedlemsVillkor: `${medlemsVillkor}.HasNoMedlemsVillkor`,\r\n HasNoSmsEmailVillkor: `${medlemsVillkor}.HasNoSmsEmailVillkor`,\r\n};\r\n\r\nconst passDetails = 'PassDetails';\r\nconst PassDetails = {\r\n XDropsAvailable: `${passDetails}.XDropsAvailable`,\r\n DropInRule: `${passDetails}.DropInRule`,\r\n PlayFilmAbout: `${passDetails}.PlayFilmAbout`,\r\n LoadingFailed: `${passDetails}.LoadingFailed`,\r\n};\r\n\r\nconst pushNotificationSettings = 'PushNotificationSettings';\r\nconst PushNotificationSettings = {\r\n NewsText: `${pushNotificationSettings}.NewsText`,\r\n NewsTitle: `${pushNotificationSettings}.NewsTitle`,\r\n QueueText: `${pushNotificationSettings}.QueueText`,\r\n QueueTitle: `${pushNotificationSettings}.QueueTitle`,\r\n TrainingCardText: `${pushNotificationSettings}.TrainingCardText`,\r\n TrainingCardTitle: `${pushNotificationSettings}.TrainingCardTitle`,\r\n WorkoutTitle: `${pushNotificationSettings}.WorkoutTitle`,\r\n WorkoutText: `${pushNotificationSettings}.WorkoutText`,\r\n};\r\n\r\nconst resetPassword = 'ResetPasswordPage';\r\nconst changePasswordError = `${resetPassword}.ChangePasswordError`;\r\n\r\nconst ChangePasswordError = {\r\n UNKNOWN: `${changePasswordError}.UNKNOWN`,\r\n INVALID_TOKEN: `${changePasswordError}.INVALID_TOKEN`,\r\n};\r\n\r\nconst ResetPassword = {\r\n Login: `${resetPassword}.Login`,\r\n ChangePassword: `${resetPassword}.ChangePassword`,\r\n ResetSucceeded: `${resetPassword}.ResetSucceeded`,\r\n ChangePasswordError,\r\n};\r\n\r\nconst trainingPreferences = 'TrainingPreferences';\r\nconst TrainingPreferences = {\r\n Add: `${trainingPreferences}.Add`,\r\n Facilities: `${trainingPreferences}.Facilities`,\r\n FacilitiesText: `${trainingPreferences}.FacilitiesText`,\r\n SpecialInterests: `${trainingPreferences}.SpecialInterests`,\r\n SpecialInterestsText: `${trainingPreferences}.SpecialInterestsText`,\r\n Text: `${trainingPreferences}.Text`,\r\n Title: `${trainingPreferences}.Title`,\r\n Save: `${trainingPreferences}.Save`,\r\n WorkoutLevel: `${trainingPreferences}.WorkoutLevel`,\r\n Children: `${trainingPreferences}.Children`,\r\n Preferences: `${trainingPreferences}.Preferences.`,\r\n};\r\n\r\nconst receipt = 'Receipt';\r\nconst specificReceipt = `${receipt}.Specific`;\r\nconst Receipt = {\r\n ClickToSignAutogiro: `${receipt}.ClickToSignAutogiro`,\r\n ContinueToTheWebSite: `${receipt}.ContinueToTheWebSite`,\r\n DisplayReceipt: `${receipt}.DisplayReceipt`,\r\n ContinueToApp: `${receipt}.ContinueToApp`,\r\n ReceiptText: `${receipt}.ReceiptText`,\r\n ReceiptTitle: `${receipt}.ReceiptTitle`,\r\n ReceiptAdditionalText: `${receipt}.ReceiptAdditionalText`,\r\n ReceiptAdditionalTitle: `${receipt}.ReceiptAdditionalTitle`,\r\n SpecificReceipt: {\r\n Title: `${specificReceipt}.Title`, // Kvittouppgifter\r\n Date: `${specificReceipt}.Date`, // Datum\r\n PaymentMethod: `${specificReceipt}.PaymentMethod`, // Betalsätt\r\n ReceiptNumber: `${specificReceipt}.ReceiptNumber`, // Kvittonummer\r\n OrderNumber: `${specificReceipt}.OrderNumber`, // Beställningsnummer\r\n SellerTitle: `${specificReceipt}.SellerTitle`, // Säljare\r\n SellerInfo: `${specificReceipt}.SellerInfo`, // Säljare\r\n Email: `${specificReceipt}.Email`, // E-postadress\r\n Homepage: `${specificReceipt}.Homepage`, // Hemsida\r\n PhoneNumber: `${specificReceipt}.PhoneNumber`, // Telefonnummer\r\n OrganisationId: `${specificReceipt}.OrganisationId`, // Organisationsnummer\r\n BuyerTitle: `${specificReceipt}.BuyerTitle`, // Kund\r\n Name: `${specificReceipt}.Name`, // Namn\r\n Address: `${specificReceipt}.Address`, // Adress\r\n ProductsTitle: `${specificReceipt}.ProductsTitle`, // Produkter\r\n Product: `${specificReceipt}.Product`, // Produkt\r\n Amount: `${specificReceipt}.Amount`, // Antal\r\n Total: `${specificReceipt}.Total`, // Totalt\r\n Sum: `${specificReceipt}.Sum`, // Totalt\r\n IncludingVAT: `${specificReceipt}.IncludingVAT`, // Varav moms ($0)\r\n PayedToday: `${specificReceipt}.PayedToday`, // Betalt idag\r\n DirectDebitSe: `${specificReceipt}.DirectDebitSe`, // Svenskt autogiro\r\n DirectDebitNo: `${specificReceipt}.DirectDebitNo`, // Norkst autogiro\r\n RecurringCardPayment: `${specificReceipt}.RecurringCardPayment`, // Återkommande kortbetalning\r\n DirectDebitConsentTitle: `${specificReceipt}.DirectDebitConsentTitle`, // Autogiromedgivanden\r\n ReceiptDetailsNotFoundTitle: `${specificReceipt}.ReceiptDetailsNotFoundTitle`, // Kunde inte hämta kvittodetaljerna\r\n CouponCode: `${specificReceipt}.CouponCode`, // Rabattkod \"$\"\r\n PrintButton: `${specificReceipt}.PrintButton`, // Skriv ut eller spara som PDF\r\n },\r\n};\r\n\r\nconst blueScreen = 'ErrorPage';\r\nconst ErrorPage = {\r\n AnErrorOccured: `${blueScreen}.AnErrorOccured`,\r\n ClickHereToRefresh: `${blueScreen}.ClickHereToRefresh`,\r\n};\r\n\r\nconst filter = 'Filter';\r\nconst Filter = {\r\n TooManyItems: `${filter}.TooManyItems`,\r\n};\r\n\r\nconst requestResetPasswordPage = 'RequestResetPasswordPage';\r\nconst RequestResetPasswordPage = {\r\n Email: `${requestResetPasswordPage}.Email`,\r\n EmailPlaceholder: `${requestResetPasswordPage}.EmailPlaceholder`,\r\n Help: `${requestResetPasswordPage}.Help`,\r\n HowToLoginAnswer: `${requestResetPasswordPage}.HowToLoginAnswer`,\r\n HowToLoginQuestion: `${requestResetPasswordPage}.HowToLoginQuestion`,\r\n IForgotMyPassDesc: `${requestResetPasswordPage}.IForgotMyPassDesc`,\r\n IForgotMyPassTitle: `${requestResetPasswordPage}.IForgotMyPassTitle`,\r\n ResultFailed: `${requestResetPasswordPage}.ResultFailed`,\r\n ResultSucceed: `${requestResetPasswordPage}.ResultSucceed`,\r\n SubmitButton: `${requestResetPasswordPage}.SubmitButton`,\r\n WhoCanUseAnswer: `${requestResetPasswordPage}.WhoCanUseAnswer`,\r\n WhoCanUseQuestion: `${requestResetPasswordPage}.WhoCanUseQuestion`,\r\n};\r\n\r\nconst passItem = 'PassItem';\r\nconst PassItem = {\r\n InQueue: `${passItem}.InQueue`,\r\n Left: `${passItem}.Left`,\r\n Places: `${passItem}.Places`,\r\n QueuePosition: `${passItem}.QueuePosition`,\r\n EmptyPlaces: `${passItem}.EmptyPlaces`,\r\n Total: `${passItem}.Total`,\r\n};\r\n\r\nconst pageTitles = 'PageTitles';\r\nconst PageTitles = {\r\n Account: `${pageTitles}.Account`,\r\n Bookings: `${pageTitles}.Bookings`,\r\n Facilities: `${pageTitles}.Facilities`,\r\n MembershipAndCards: `${pageTitles}.MembershipAndCards`,\r\n News: `${pageTitles}.News`,\r\n Notifications: `${pageTitles}.Notifications`,\r\n Payment: `${pageTitles}.Payment`,\r\n PaymentMethods: `${pageTitles}.PaymentMethods`,\r\n Profile: `${pageTitles}.Profile`,\r\n ProfileAndSettings: `${pageTitles}.ProfileAndSettings`,\r\n PushNotifications: `${pageTitles}.PushNotifications`,\r\n Schedule: `${pageTitles}.Schedule`,\r\n Shop: `${pageTitles}.Shop`,\r\n ShoppingBasket: `${pageTitles}.ShoppingBasket`,\r\n Statistics: `${pageTitles}.Statistics`,\r\n TrainingsPreferences: `${pageTitles}.TrainingsPreferences`,\r\n Receipt: `${pageTitles}.Receipt`,\r\n};\r\n\r\nconst acceptBookingRulesPopup = 'AcceptBookingRulesPopup';\r\nconst AcceptBookingRulesPopup = {\r\n Text: `${acceptBookingRulesPopup}.Text`,\r\n Cancel: `${acceptBookingRulesPopup}.Cancel`,\r\n TryAgain: `${acceptBookingRulesPopup}.TryAgain`,\r\n FailedToUpdate: `${acceptBookingRulesPopup}.FailedToUpdate`,\r\n Accept: `${acceptBookingRulesPopup}.Accept`,\r\n};\r\n\r\nconst WeekDays = {\r\n Monday: 'WeekDays.Monday',\r\n Tuesday: 'WeekDays.Tuesday',\r\n Wednesday: 'WeekDays.Wednesday',\r\n Thursday: 'WeekDays.Thursday',\r\n Friday: 'WeekDays.Friday',\r\n Saturday: 'WeekDays.Saturday',\r\n Sunday: 'WeekDays.Sunday',\r\n Today: 'WeekDays.Today',\r\n Tomorrow: 'WeekDays.Tomorrow',\r\n};\r\n\r\nconst Months = {\r\n January: 'Months.January',\r\n February: 'Months.February',\r\n March: 'Months.March',\r\n April: 'Months.April',\r\n May: 'Months.May',\r\n June: 'Months.June',\r\n July: 'Months.July',\r\n August: 'Months.August',\r\n September: 'Months.September',\r\n October: 'Months.October',\r\n November: 'Months.November',\r\n December: 'Months.December',\r\n};\r\n\r\nexport const SitecoreDictionary = {\r\n CopyFailCode: 'CopyFailCode',\r\n UnknownError: 'UnknownError',\r\n PageNotFound: 'PageNotFound',\r\n Bookings,\r\n Cart,\r\n Common,\r\n Login,\r\n MainMenu,\r\n PaymentErrorMessages,\r\n Profile,\r\n ProfileMenu,\r\n PushNotificationSettings,\r\n Schedule,\r\n Signing,\r\n Shop,\r\n StartPage,\r\n Statistics,\r\n SubscriptionsAndCards,\r\n Settings,\r\n Facilities,\r\n MedlemsVillkor,\r\n UserAccount,\r\n PassDetails,\r\n ResetPassword,\r\n GDPR,\r\n TrainingPreferences,\r\n Receipt,\r\n ErrorPage,\r\n Filter,\r\n RequestResetPasswordPage,\r\n PassItem,\r\n PageTitles,\r\n AcceptBookingRulesPopup,\r\n WeekDays,\r\n Months,\r\n};\r\n\r\nexport const SitecorePlaceholder = {\r\n FOERENING: '{association}',\r\n PASS: '{activity}',\r\n};\r\n\r\nexport const getStatusMessage = (status: string) => {\r\n if (status in SitecoreDictionary.Schedule.Messages) {\r\n return (SitecoreDictionary.Schedule.Messages as any)[status];\r\n } else {\r\n return SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR;\r\n }\r\n};\r\n\r\nexport const getSubscriptionStatusMessage = (status: string) => {\r\n if (status in SitecoreDictionary.SubscriptionsAndCards.Messages) {\r\n return (SitecoreDictionary.SubscriptionsAndCards.Messages as any)[status];\r\n } else {\r\n return SitecoreDictionary.SubscriptionsAndCards.Messages.UNKNOWN_ERROR;\r\n }\r\n};\r\n\r\nexport const getShoppingBasketError = (status: string | undefined) => {\r\n if (status && status in SitecoreDictionary.Cart) {\r\n return (SitecoreDictionary.Cart as any)[status];\r\n }\r\n return SitecoreDictionary.Cart.UNKNOWN_ERROR;\r\n};\r\n\r\nexport const getPaymentSettingsError = (status: string) => {\r\n if (status in SitecoreDictionary.Profile.PaymentSettings) {\r\n return (SitecoreDictionary.Profile.PaymentSettings as any)[status];\r\n } else {\r\n return SitecoreDictionary.Profile.PaymentSettings.UNKNOWN_ERROR;\r\n }\r\n};\r\n\r\nexport interface TranslationMapping {\r\n [index: string]: string;\r\n}\r\n\r\nexport const getWeekdayName = (weekday: number): string => {\r\n switch (weekday) {\r\n case 0:\r\n return 'Sunday';\r\n case 1:\r\n return 'Monday';\r\n case 2:\r\n return 'Tuesday';\r\n case 3:\r\n return 'Wednesday';\r\n case 4:\r\n return 'Thursday';\r\n case 5:\r\n return 'Friday';\r\n case 6:\r\n return 'Saturday';\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\nexport const getMonthName = (month: number): string => {\r\n switch (month) {\r\n case 0:\r\n return 'January';\r\n case 1:\r\n return 'February';\r\n case 2:\r\n return 'March';\r\n case 3:\r\n return 'April';\r\n case 4:\r\n return 'May';\r\n case 5:\r\n return 'June';\r\n case 6:\r\n return 'July';\r\n case 7:\r\n return 'August';\r\n case 8:\r\n return 'September';\r\n case 9:\r\n return 'October';\r\n case 10:\r\n return 'November';\r\n case 11:\r\n return 'December';\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\nexport const getWeekdaysObjectMap = (): TranslationMapping => {\r\n const dayKeys = getWeekDays();\r\n const returnObject = {};\r\n dayKeys.map(dayKey => {\r\n return ((returnObject as any)[dayKey] = dayKey);\r\n });\r\n return returnObject;\r\n};\r\n\r\nexport const getDayPeriodsObjectMap = (): TranslationMapping => {\r\n const translate = getTranslate(store.getState().locale);\r\n const dayPeriods = Object.keys(ScheduleDayPeriods);\r\n const returnObject = {};\r\n dayPeriods.map(dayPeriod => {\r\n return ((returnObject as any)[dayPeriod] = translate((ScheduleDayPeriods as any)[dayPeriod]) as string);\r\n });\r\n return returnObject;\r\n};\r\n\r\nexport const getShopFilterCategoryValuesObjectMap = (): TranslationMapping => {\r\n const translate = getTranslate(store.getState().locale);\r\n const categoryKeys = Object.keys(ShopFilterCategoryValues); // ProductHow, ProductWhen, ProductWho\r\n const returnObject = {};\r\n categoryKeys.forEach(categoryKey => {\r\n const categoryObject = (ShopFilterCategoryValues as any)[categoryKey];\r\n const categoryObjectKeys = Object.keys(categoryObject); // Keys in ProductHow, ProductWhen, ProductWho, i.e., DIRECT_DEBIT_NO, Pensionar etc.\r\n categoryObjectKeys.forEach(categoryObjectKey => {\r\n if (\r\n ShopFilterCategoryValues &&\r\n (ShopFilterCategoryValues as any)[categoryKey] &&\r\n (ShopFilterCategoryValues as any)[categoryKey][categoryObjectKey]\r\n ) {\r\n const translationKey = (ShopFilterCategoryValues as any)[categoryKey][categoryObjectKey];\r\n (returnObject as any)[categoryObjectKey] = translate(translationKey) as string;\r\n }\r\n });\r\n });\r\n return returnObject;\r\n};\r\n\r\nexport const getBokningsstatusarObjectMap = (): TranslationMapping => {\r\n const translate = getTranslate(store.getState().locale);\r\n const bokningsstatusar = Object.keys(ScheduleBookingStatus);\r\n const returnObject = {};\r\n bokningsstatusar.map(status => {\r\n return ((returnObject as any)[status] = translate((ScheduleBookingStatus as any)[status]) as string);\r\n });\r\n return returnObject;\r\n};\r\n","export enum BokningsStatusEnum {\r\n EJ_BOKNINGSBART_DATE_DROPIN = 'EJ_BOKNINGSBART_DATE_DROPIN',\r\n FOERSENT_FOER_ATT_BOKA = 'FOERSENT_FOER_ATT_BOKA',\r\n FOERTIDIGT_FOER_ATT_BOKA = 'FOERTIDIGT_FOER_ATT_BOKA',\r\n BOKNINGSBART = 'BOKNINGSBART',\r\n BOKNINGSBART_DROPIN = 'BOKNINGSBART_DROPIN',\r\n BOKNINGSBART_KOE = 'BOKNINGSBART_KOE',\r\n BOKNINGSBART_KOE_DROPIN = 'BOKNINGSBART_KOE_DROPIN',\r\n FULLT = 'FULLT',\r\n FULLT_DROPIN = 'FULLT_DROPIN',\r\n DROPIN = 'DROPIN',\r\n INSTAELLD = 'INSTAELLD',\r\n}\r\n","export enum ProductPaymentMethod {\r\n Card = 'Card',\r\n AutoGiro = 'AutoGiro',\r\n}\r\n\r\nexport enum PaymentMethodType {\r\n BANK = 'BANK',\r\n CARD = 'CARD',\r\n SWISH = 'SWISH',\r\n UNKNOWN = 'UNKNOWN',\r\n}\r\n","export const NotificationOptions = {\r\n PassCancelled: 'PassCancelled',\r\n Vaentelista: 'Vaentelista',\r\n News: 'News',\r\n TraeningskortAboutToExpire: 'TraeningskortAboutToExpire',\r\n};\r\n","export enum PersonLookupStatus {\r\n EjTillgaenglig,\r\n Tillgaenglig,\r\n AnvaendareAerRegistrerad,\r\n AnvaendareHittad,\r\n AnvaendareEjHittad,\r\n}\r\n","export enum BasketActionTypes {\r\n CREATE_BASKET = 'CREATE_BASKET',\r\n DELETE_BASKET = 'DELETE_BASKET',\r\n ADD_PRODUCT = 'ADD_PRODUCT',\r\n SHOW_MEMBERSHIP_MESSAGE = 'SHOW_MEMBERSHIP_MESSAGE',\r\n SHOW_COUPON_MESSAGE = 'SHOW_COUPON_MESSAGE',\r\n DELETE_PRODUCT = 'DELETE_PRODUCT',\r\n UPDATE_BASKET = 'UPDATE_BASKET',\r\n ERROR_ON_PURCHASE = 'ERROR_ON_PURCHASE',\r\n ERROR_ON_CREATE_PAYMENT = 'ERROR_ON_CREATE_PAYMENT',\r\n ERROR_ON_CREATE_USER = 'ERROR_ON_CREATE_USER',\r\n UPDATE_AUTOGIRO_ACCOUNT_NUMBER = 'UPDATE_AUTOGIRO_ACCOUNT_NUMBER',\r\n UPDATE_AUTOGIRO_CLEARING_NUMBER = 'UPDATE_AUTOGIRO_CLEARING_NUMBER',\r\n UPDATE_PAYMENT_METHOD = 'UPDATE_PAYMENT_METHOD',\r\n UPDATE_PHONE_NUMBER = 'UPDATE_PHONE_NUMBER',\r\n UPDATE_ORDER = 'UPDATE_ORDER',\r\n}\r\n\r\ninterface AddProductAction {\r\n type: BasketActionTypes.ADD_PRODUCT;\r\n product: fos.api.Product;\r\n foereningId: number;\r\n}\r\n\r\ninterface CreatePaymentErrorAction {\r\n type: BasketActionTypes.ERROR_ON_CREATE_PAYMENT;\r\n errors?: string[];\r\n}\r\n\r\ninterface CreateUserErrorAction {\r\n type: BasketActionTypes.ERROR_ON_CREATE_USER;\r\n errors?: string[];\r\n}\r\n\r\ninterface RemoveProductAction {\r\n type: BasketActionTypes.DELETE_PRODUCT;\r\n product: fos.api.Product;\r\n foereningId: number;\r\n}\r\n\r\ninterface CreateBasketAction {\r\n type: BasketActionTypes.CREATE_BASKET;\r\n valuta?: string;\r\n foereningId: number;\r\n}\r\n\r\ninterface UpdateBasketAction {\r\n type: BasketActionTypes.UPDATE_BASKET;\r\n products: fos.api.Product[];\r\n foereningId: number;\r\n}\r\n\r\ninterface DeleteBasketAction {\r\n type: BasketActionTypes.DELETE_BASKET;\r\n foereningId: number;\r\n}\r\n\r\ninterface BasketPurchaseErrorAction {\r\n type: BasketActionTypes.ERROR_ON_PURCHASE;\r\n error: string;\r\n}\r\n\r\ninterface UpdateAutoGiroAccountNumber {\r\n type: BasketActionTypes.UPDATE_AUTOGIRO_ACCOUNT_NUMBER;\r\n value: string;\r\n}\r\n\r\ninterface UpdateAutoGiroClearingNumber {\r\n type: BasketActionTypes.UPDATE_AUTOGIRO_CLEARING_NUMBER;\r\n value: string;\r\n}\r\n\r\ninterface ShowMembershipMessageAction {\r\n type: BasketActionTypes.SHOW_MEMBERSHIP_MESSAGE;\r\n showMembershipMessage: boolean;\r\n}\r\n\r\ninterface ShowCouponMessageAction {\r\n type: BasketActionTypes.SHOW_COUPON_MESSAGE;\r\n showCouponMessage: boolean;\r\n}\r\n\r\ninterface UpdatePaymentMethodsAction {\r\n type: BasketActionTypes.UPDATE_PAYMENT_METHOD;\r\n paymentMethodId: number;\r\n}\r\n\r\ninterface UpdatePhoneNumberAction {\r\n type: BasketActionTypes.UPDATE_PHONE_NUMBER;\r\n phoneNumber: string;\r\n}\r\n\r\ninterface UpdateOrderAction {\r\n type: BasketActionTypes.UPDATE_ORDER;\r\n order: fos.api.Order;\r\n}\r\n\r\nexport const updateAutogiroAccountNumber = (value: string): UpdateAutoGiroAccountNumber => ({\r\n type: BasketActionTypes.UPDATE_AUTOGIRO_ACCOUNT_NUMBER,\r\n value,\r\n});\r\n\r\nexport const updateAutoGiroClearingNumber = (value: string): UpdateAutoGiroClearingNumber => ({\r\n type: BasketActionTypes.UPDATE_AUTOGIRO_CLEARING_NUMBER,\r\n value,\r\n});\r\n\r\nexport const addProduct = (product: fos.api.Product, foereningId: number): AddProductAction => ({\r\n type: BasketActionTypes.ADD_PRODUCT,\r\n product,\r\n foereningId,\r\n});\r\n\r\nexport const showMembershipMessage = (showMessage: boolean): ShowMembershipMessageAction => ({\r\n type: BasketActionTypes.SHOW_MEMBERSHIP_MESSAGE,\r\n showMembershipMessage: showMessage,\r\n});\r\n\r\nexport const showCouponMessage = (showMessage: boolean): ShowCouponMessageAction => ({\r\n type: BasketActionTypes.SHOW_COUPON_MESSAGE,\r\n showCouponMessage: showMessage,\r\n});\r\n\r\nexport const onCreatePaymentError = (errors?: string[]): CreatePaymentErrorAction => ({\r\n type: BasketActionTypes.ERROR_ON_CREATE_PAYMENT,\r\n errors,\r\n});\r\n\r\nexport const onCreateUserError = (errors?: string[]): CreateUserErrorAction => ({\r\n type: BasketActionTypes.ERROR_ON_CREATE_USER,\r\n errors,\r\n});\r\n\r\nexport const removeProduct = (product: fos.api.Product, foereningId: number): RemoveProductAction => ({\r\n type: BasketActionTypes.DELETE_PRODUCT,\r\n product,\r\n foereningId,\r\n});\r\n\r\nexport const createBasket = (foereningId: number, valuta?: string): CreateBasketAction => ({\r\n type: BasketActionTypes.CREATE_BASKET,\r\n valuta,\r\n foereningId,\r\n});\r\n\r\nexport const updateBasket = (foereningId: number, products: fos.api.Product[]): UpdateBasketAction => ({\r\n type: BasketActionTypes.UPDATE_BASKET,\r\n products,\r\n foereningId,\r\n});\r\n\r\nexport const deleteBasket = (foereningId: number): DeleteBasketAction => ({\r\n type: BasketActionTypes.DELETE_BASKET,\r\n foereningId,\r\n});\r\n\r\nexport const onBasketPurchaseError = (error: string): BasketPurchaseErrorAction => ({\r\n type: BasketActionTypes.ERROR_ON_PURCHASE,\r\n error,\r\n});\r\n\r\nexport const updatePaymentMethod = (paymentMethodId: number): UpdatePaymentMethodsAction => ({\r\n type: BasketActionTypes.UPDATE_PAYMENT_METHOD,\r\n paymentMethodId,\r\n});\r\n\r\nexport const updatePhoneNumberAction = (phoneNumber: string): UpdatePhoneNumberAction => ({\r\n type: BasketActionTypes.UPDATE_PHONE_NUMBER,\r\n phoneNumber,\r\n});\r\n\r\nexport const updateOrderAction = (order: fos.api.Order): UpdateOrderAction => ({\r\n type: BasketActionTypes.UPDATE_ORDER,\r\n order,\r\n});\r\n\r\nexport type BasketActions =\r\n | AddProductAction\r\n | ShowMembershipMessageAction\r\n | ShowCouponMessageAction\r\n | RemoveProductAction\r\n | CreateBasketAction\r\n | DeleteBasketAction\r\n | UpdateBasketAction\r\n | BasketPurchaseErrorAction\r\n | CreatePaymentErrorAction\r\n | UpdateAutoGiroAccountNumber\r\n | UpdateAutoGiroClearingNumber\r\n | CreateUserErrorAction\r\n | UpdatePaymentMethodsAction\r\n | UpdatePhoneNumberAction\r\n | UpdateOrderAction;\r\n","export interface SessionState {\r\n activeFoerening?: number;\r\n shopFoerening?: number;\r\n inloggadeFoereningar: fos.api.InloggadeFoerening[];\r\n userId?: number;\r\n shouldAcceptBookingRules?: boolean;\r\n passToBook?: fos.api.Pass;\r\n orderId?: number;\r\n}\r\n\r\nexport enum SessionActionTypes {\r\n SetActiveFoerening = 'session/SetActiveFoerening',\r\n SetShopFoerening = 'session/SetShopFoerening',\r\n ClearActiveFoerening = 'session/ClearActiveFoerening',\r\n SetInloggadeFoereningar = 'session/SetInloggadeFoereningar',\r\n SetFoereningExtraInfo = 'session/setFoereningExtraInfo',\r\n SetUserId = 'session/SetUserId',\r\n ShouldAcceptBookingRules = 'session/SHOULD_ACCEPT_BOOKING_RULES',\r\n SetPassIdToBook = 'session/SET_PASS_ID_TO_BOOK',\r\n SetOrderId = 'session/SET_ORDER_ID',\r\n}\r\nexport interface ClearActiveFoereningAction {\r\n type: SessionActionTypes.ClearActiveFoerening;\r\n}\r\n\r\nexport interface SetActiveFoereningAction {\r\n type: SessionActionTypes.SetActiveFoerening;\r\n foereningId: number;\r\n}\r\n\r\nexport interface SetShopFoereningAction {\r\n type: SessionActionTypes.SetShopFoerening;\r\n foereningId?: number;\r\n}\r\n\r\nexport interface SetInloggadeFoereningarAction {\r\n type: SessionActionTypes.SetInloggadeFoereningar;\r\n inloggadeFoereningar: fos.api.InloggadeFoerening[];\r\n}\r\n\r\nexport interface SetFoereningExtraInfoAction {\r\n type: SessionActionTypes.SetFoereningExtraInfo;\r\n extraInfo: fos.api.ExtraFoereningInfo;\r\n foereningName: string;\r\n}\r\n\r\nexport interface SetUserIdAction {\r\n type: SessionActionTypes.SetUserId;\r\n userId: number;\r\n}\r\n\r\nexport interface ShouldAcceptBookingRulesAction {\r\n type: SessionActionTypes.ShouldAcceptBookingRules;\r\n value: boolean;\r\n}\r\n\r\nexport interface SetPassIdToBookAction {\r\n type: SessionActionTypes.SetPassIdToBook;\r\n value?: fos.api.Pass;\r\n}\r\n\r\nexport interface SetOrderIdAction {\r\n type: SessionActionTypes.SetOrderId;\r\n orderId?: number;\r\n}\r\n","import {\r\n SetActiveFoereningAction,\r\n SessionActionTypes,\r\n SetInloggadeFoereningarAction,\r\n ClearActiveFoereningAction,\r\n SetUserIdAction,\r\n SetPassIdToBookAction,\r\n} from '.';\r\nimport {\r\n ShouldAcceptBookingRulesAction,\r\n SetShopFoereningAction,\r\n SetOrderIdAction,\r\n SetFoereningExtraInfoAction,\r\n} from './sessionModels';\r\n\r\nexport const clearActiveFoerening = (): ClearActiveFoereningAction => ({\r\n type: SessionActionTypes.ClearActiveFoerening,\r\n});\r\n\r\nexport const setActiveFoerening = (foereningId: number): SetActiveFoereningAction => ({\r\n type: SessionActionTypes.SetActiveFoerening,\r\n foereningId,\r\n});\r\nexport const setShopFoerening = (foereningId?: number): SetShopFoereningAction => ({\r\n type: SessionActionTypes.SetShopFoerening,\r\n foereningId,\r\n});\r\n\r\nexport const setInloggadeFoereningar = (\r\n inloggadeFoereningar: fos.api.InloggadeFoerening[]\r\n): SetInloggadeFoereningarAction => ({\r\n type: SessionActionTypes.SetInloggadeFoereningar,\r\n inloggadeFoereningar,\r\n});\r\n\r\nexport const setFoereningExtraInfo = (\r\n foereningExtraInfo: fos.api.ExtraFoereningInfo,\r\n foerening: string\r\n): SetFoereningExtraInfoAction => ({\r\n type: SessionActionTypes.SetFoereningExtraInfo,\r\n extraInfo: foereningExtraInfo,\r\n foereningName: foerening,\r\n});\r\n\r\nexport const setUserId = (userId: number): SetUserIdAction => ({\r\n type: SessionActionTypes.SetUserId,\r\n userId,\r\n});\r\nexport const setShouldAcceptBookingRulesAction = (shouldAccept: boolean): ShouldAcceptBookingRulesAction => ({\r\n type: SessionActionTypes.ShouldAcceptBookingRules,\r\n value: shouldAccept,\r\n});\r\n\r\nexport const setPassToBook = (pass?: fos.api.Pass): SetPassIdToBookAction => ({\r\n type: SessionActionTypes.SetPassIdToBook,\r\n value: pass,\r\n});\r\n\r\nexport const setOrderId = (orderId?: number): SetOrderIdAction => ({\r\n type: SessionActionTypes.SetOrderId,\r\n orderId,\r\n});\r\n\r\nexport type SessionActions =\r\n | ClearActiveFoereningAction\r\n | SetActiveFoereningAction\r\n | SetShopFoereningAction\r\n | SetInloggadeFoereningarAction\r\n | SetFoereningExtraInfoAction\r\n | SetUserIdAction\r\n | ShouldAcceptBookingRulesAction\r\n | SetPassIdToBookAction\r\n | SetOrderIdAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { SessionActionTypes, SessionState } from '.';\r\n\r\nconst initialState: SessionState = {\r\n inloggadeFoereningar: [],\r\n // shouldShowCalendarSync: false\r\n};\r\n\r\nexport const sessionReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case SessionActionTypes.ClearActiveFoerening:\r\n return {\r\n ...state,\r\n activeFoerening: undefined,\r\n };\r\n\r\n case SessionActionTypes.SetActiveFoerening:\r\n return {\r\n ...state,\r\n activeFoerening: action.foereningId,\r\n };\r\n\r\n case SessionActionTypes.SetShopFoerening:\r\n return {\r\n ...state,\r\n shopFoerening: action.foereningId,\r\n };\r\n\r\n case SessionActionTypes.SetInloggadeFoereningar:\r\n return {\r\n ...state,\r\n inloggadeFoereningar: action.inloggadeFoereningar,\r\n };\r\n case SessionActionTypes.SetFoereningExtraInfo:\r\n // @Speed\r\n const arr = JSON.parse(JSON.stringify(state.inloggadeFoereningar)) as fos.api.InloggadeFoerening[];\r\n const foe = arr.findIndex(f => f.Namn === action.foereningName);\r\n if (foe >= 0) {\r\n arr[foe].ExtraFoereningInfo = action.extraInfo;\r\n }\r\n return {\r\n ...state,\r\n inloggadeFoereningar: arr,\r\n };\r\n case SessionActionTypes.SetUserId:\r\n return {\r\n ...state,\r\n userId: action.userId,\r\n };\r\n case SessionActionTypes.ShouldAcceptBookingRules:\r\n return {\r\n ...state,\r\n shouldAcceptBookingRules: action.value,\r\n };\r\n case SessionActionTypes.SetPassIdToBook:\r\n return {\r\n ...state,\r\n passToBook: action.value,\r\n };\r\n case SessionActionTypes.SetOrderId:\r\n return {\r\n ...state,\r\n orderId: action.orderId,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum EntityStatus {\r\n INITIAL = 'ENTITY_STATUS/INITIAL',\r\n FETCHING = 'ENTITY_STATUS/FETCHING',\r\n FETCHING_IN_BACKGROUND = 'ENTITY_STATUS/FETCHING_IN_BACKGROUND',\r\n SUCCESS = 'ENTITY_STATUS/SUCCESS', // TODO - FETCHED?\r\n FAILED = 'ENTITY_STATUS/FAILED',\r\n SAVING = 'ENTITY_STATUS/SAVING',\r\n SAVING_FAILED = 'ENTITY_STATUS/SAVING_FAILED',\r\n DELETED = 'ENTITY_STATUS/DELETED',\r\n}\r\n\r\nexport enum CommandStatus {\r\n INITIAL = 'COMMAND_STATUS/INITIAL',\r\n EXECUTING = 'COMMAND_STATUS/EXECUTING',\r\n EXECUTED = 'COMMAND_STATUS/EXECUTED',\r\n EXECUTING_FAILED = 'COMMAND_STATUS/EXECUTING_FAILED',\r\n}\r\n\r\n// Används för aggregat som har id:n\r\nexport type FetchStatus = FetchAggregateStatus | FetchCommandStatus;\r\nexport interface FetchAggregateStatus {\r\n readonly id: number | string;\r\n readonly contextType: ContextType;\r\n readonly aggregateType: FetchStatusAggregateTypes;\r\n readonly commandType: undefined;\r\n readonly status: EntityStatus | CommandStatus;\r\n readonly reason: string | null;\r\n readonly date: Date;\r\n}\r\n\r\nexport interface FetchCommandStatus {\r\n readonly id: string;\r\n readonly contextType: ContextType;\r\n readonly aggregateType: undefined;\r\n readonly commandType: FetchCommandTypes;\r\n readonly status: EntityStatus | CommandStatus;\r\n readonly reason: string | null;\r\n readonly date: Date;\r\n}\r\n\r\nexport enum ContextTypes {\r\n MITT_FRISKIS = 'CONTEXT_TYPES/MITT_FRISKIS',\r\n}\r\n\r\nexport enum FetchStatusAggregateTypes {\r\n PASS = 'FETCH_STATUS_AGGREGATE_TYPES/PASS',\r\n PASS_LIST = 'FETCH_STATUS_AGGREGATE_TYPES/PASS_LIST',\r\n BOKNING = 'FETCH_STATUS_AGGREGATE_TYPES/BOKNING',\r\n ANVAENDARE = 'FETCH_STATUS_AGGREGATE_TYPES/ANVAENDARE',\r\n MEDLEMSKAP_OCH_KORT = 'FETCH_STATUS_AGGREGATE_TYPES/MEDLEMSKAP_OCH_KORT',\r\n MEDLEM_VILLKOR = 'FETCH_STATUS_AGGREGATE_TYPES/MEDLEM_VILLKOR',\r\n SMS_EMAIL_VILLKOR = 'FETCH_STATUS_AGGREGATE_TYPES/SMS_EMAIL_VILLKOR',\r\n TRAENINGSSTATISTIK = 'FETCH_STATUS_AGGREGATE_TYPES/TRAENINGSSTATISTIK',\r\n REGISTRERADE_BETALNINGS_MEDEL = 'FETCH_STATUS_AGGREGATE_TYPES/REGISTRERADE_BETALNINGS_MEDEL',\r\n ANLAEGGNINGAR = 'FETCH_STATUS_AGGREGATE_TYPES/ANLAEGGNIGNAR',\r\n GET_PRODUCTS = 'FETCH_STATUS_AGGREGATE_TYPES/GET_PRODUCTS',\r\n GET_FILTER = 'FETCH_STATUS_AGGREGATE_TYPES/GET_FILTER',\r\n GET_FOERENINGAR = 'FETCH_STATUS_AGGREGATE_TYPES/GET_FOERENINGAR',\r\n GET_PAYMENT_METHODS = 'FETCH_STATUS_AGGREGATE_TYPES/GET_PAYMENT_METHODS',\r\n NOTIFICATIONS = 'FETCH_STATUS_AGGREGATE_TYPES/NOTIFICATIONS',\r\n NOTIFICATIONS_SETTINGS = 'FETCH_STATUS_AGGREGATE_TYPES/NOTIFICATIONS_SETTINGS',\r\n NEWS = 'FETCH_STATUS_AGGREGATE_TYPES/NEWS',\r\n SIGNATURECASE = 'FETCH_STATUS_AGGREGATE_TYPES/SIGNATURECASE',\r\n PRODUCT_INFO = 'FETCH_STATUS_AGGREGATE_TYPES/PRODUCT_INFO',\r\n GET_BILDER = 'FETCH_STATUS_AGGREGATE_TYPES/GET_BILDER',\r\n GET_RECEIPT = 'FETCH_STATUS_AGGREGATE_TYPES/GET_RECEIPT',\r\n GET_PERSON_LOOKUP_AVAILABLE = 'FETCH_STATUS_AGGREGATE_TYPES/GET_PERSON_LOOKUP_AVAILABLE',\r\n GET_PERSON_LOOKUP = 'FETCH_STATUS_AGGREGATE_TYPES/GET_PERSON_LOOKUP',\r\n GET_ORDER = 'FETCH_STATUS_AGGREGATE_TYPES/GET_ORDER',\r\n GET_CALENDAR = 'FETCH_STATUS_AGGREGATE_TYPES/GET_CALENDAR',\r\n RECEIPT_INFOS = 'FETCH_STATUS_AGGREGATE_TYPES/RECEIPT_INFOS',\r\n}\r\n\r\nexport enum FetchCommandTypes {\r\n SKAPA_MEDLEMSSKAP = 'FETCH_COMMAND_TYPES/SKAPA_MEDLEMSSKAP',\r\n FOERNYA_MEDLEMSSKAP = 'FETCH_COMMAND_TYPES/FOERNYA_MEDLEMSSKAP',\r\n AVSLUTA_MEDLEMSSKAP = 'FETCH_COMMAND_TYPES/AVSLUTA_MEDLEMSSKAP',\r\n BOKA_PASS = 'FETCH_COMMAND_TYPES/BOKA_PASS',\r\n AVBOKA_PASS = 'FETCH_COMMAND_TYPES/AVBOKA_PASS',\r\n LOGIN = 'FETCH_COMMAND_TYPES/LOGIN',\r\n SKAPA_ANVAENDARE = 'FETCH_COMMAND_TYPES/SKAPA_ANVAENDARE',\r\n SPARA_ANVAENDARE = 'FETCH_COMMAND_TYPES/SPARA_ANVAENDARE',\r\n AENDRA_LOESENORD = 'FETCH_COMMAND_TYPES/AENDRA_LOESENORD',\r\n RESET_LOESENORD = 'FETCH_COMMAND_TYPES/RESET_LOESENORD',\r\n UPDATE_AUTOGIRO = 'FETCH_COMMAND_TYPES/UPDATE_AUTOGIRO',\r\n BUY_BASKET = 'FETCH_COMMAND_TYPES/BUY_BASKET',\r\n MARK_NOTIFICATIONS_AS_READ = 'FETCH_COMMAND_TYPES/MARK_NOTIFICATIONS_AS_READ',\r\n REGISTER_DEVICE_ID = 'FETCH_COMMAND_TYPES/REGISTER_DEVICE_ID',\r\n ACCEPT_BOOKING_RULES = 'FETCH_COMMAND_TYPES/ACCEPT_BOOKING_RULES',\r\n CREATE_ORDER = 'FETCH_COMMAND_TYPES/CREATE_ORDER',\r\n SET_CALENDAR_SYNC = 'SET_CALENDAR_SYNC',\r\n SET_SELECTED_CALENDAR = 'SET_SELECTED_CALENDAR',\r\n ADD_TO_ORDER = 'ADD_TO_ORDER',\r\n REMOVE_FROM_ORDER = 'REMOVE_FROM_ORDER',\r\n SET_USER_ON_ORDER = 'FETCH_COMMAND_TYPES/SET_USER_ON_ORDER',\r\n}\r\n\r\nexport type ContextType =\r\n | ContextTypes.MITT_FRISKIS\r\n | FetchStatusAggregateTypes.MEDLEM_VILLKOR\r\n | FetchStatusAggregateTypes.ANLAEGGNINGAR;\r\n","import {\r\n FetchStatusAggregateTypes,\r\n FetchCommandTypes,\r\n ContextType,\r\n ContextTypes,\r\n EntityStatus,\r\n CommandStatus,\r\n} from './fetchModels';\r\n\r\nexport type FetchAction =\r\n | InitialFetchgAction\r\n | FetchingAction\r\n | FetchingInBackgroundAction\r\n | FetchedFailedAction\r\n | FetchedAction\r\n | SavingAction\r\n | SavedFailedAction\r\n | SavedAction\r\n | DeleteAction\r\n | InitialCommandAction\r\n | ExecutingAction\r\n | ExecutingFailedAction\r\n | ExecutingSuccessfulAction;\r\n\r\nexport type FetchAggregateTypeBase = FetchBase & {\r\n id: number | string;\r\n aggregateType: FetchStatusAggregateTypes;\r\n commandType: undefined;\r\n};\r\n\r\nexport type FetchCommandTypeBase = FetchBase & {\r\n id: number | string;\r\n aggregateType: undefined;\r\n commandType: FetchCommandTypes;\r\n};\r\n\r\nexport type FetchBase = {\r\n contextType: ContextType;\r\n};\r\n\r\nexport type InitialFetchgAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.INITIAL;\r\n};\r\n\r\nexport type FetchingAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.FETCHING;\r\n};\r\n\r\nexport type FetchingInBackgroundAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.FETCHING_IN_BACKGROUND;\r\n};\r\n\r\nexport type FetchedFailedAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.FAILED;\r\n};\r\n\r\nexport type FetchedAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.SUCCESS;\r\n // tslint:disable-next-line:no-any\r\n entity: any;\r\n};\r\n\r\nexport type SavingAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.SAVING;\r\n};\r\n\r\nexport type SavedFailedAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.SAVING_FAILED;\r\n reason: string;\r\n};\r\n\r\nexport type SavedAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.SUCCESS;\r\n // tslint:disable-next-line:no-any\r\n entity: any;\r\n};\r\n\r\nexport type DeleteAction = FetchAggregateTypeBase & {\r\n type: EntityStatus.DELETED;\r\n};\r\nexport type InitialCommandAction = FetchCommandTypeBase & {\r\n type: CommandStatus.INITIAL;\r\n};\r\nexport type ExecutingAction = FetchCommandTypeBase & {\r\n type: CommandStatus.EXECUTING;\r\n};\r\n\r\nexport type ExecutingFailedAction = FetchCommandTypeBase & {\r\n type: CommandStatus.EXECUTING_FAILED;\r\n};\r\n\r\nexport type ExecutingSuccessfulAction = FetchCommandTypeBase & {\r\n type: CommandStatus.EXECUTED;\r\n};\r\n\r\nexport const initialFetch = (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): InitialFetchgAction => ({\r\n type: EntityStatus.INITIAL,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const fetching = (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): FetchingAction => ({\r\n type: EntityStatus.FETCHING,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const fetchingInBackground = (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): FetchingInBackgroundAction => ({\r\n type: EntityStatus.FETCHING_IN_BACKGROUND,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const fetched =\r\n // tslint:disable:no-any\r\n (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n entity: any,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n ): FetchedAction => ({\r\n type: EntityStatus.SUCCESS,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n entity,\r\n });\r\n// tslint:enable:no-any\r\n\r\nexport const fetchedFailed = (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): FetchedFailedAction => ({\r\n type: EntityStatus.FAILED,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const saving = (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): SavingAction => ({\r\n type: EntityStatus.SAVING,\r\n id,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const saveFailed = (\r\n id: number | string,\r\n reason: string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): SavedFailedAction => ({\r\n type: EntityStatus.SAVING_FAILED,\r\n id,\r\n reason,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n});\r\n\r\nexport const saved =\r\n // tslint:disable:no-any\r\n (\r\n id: number | string,\r\n entity: any,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n ): SavedAction => ({\r\n type: EntityStatus.SUCCESS,\r\n id,\r\n entity,\r\n aggregateType,\r\n commandType: undefined,\r\n contextType,\r\n });\r\n// tslint:enable:no-any\r\n\r\nexport const initialCommand = (\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): InitialCommandAction => ({\r\n type: CommandStatus.INITIAL,\r\n id,\r\n aggregateType: undefined,\r\n commandType,\r\n contextType,\r\n});\r\nexport const executingCommand = (\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): ExecutingAction => ({\r\n type: CommandStatus.EXECUTING,\r\n id,\r\n aggregateType: undefined,\r\n commandType,\r\n contextType,\r\n});\r\n\r\nexport const executedCommand = (\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): ExecutingSuccessfulAction => ({\r\n type: CommandStatus.EXECUTED,\r\n id,\r\n aggregateType: undefined,\r\n commandType,\r\n contextType,\r\n});\r\n\r\nexport const executingCommandFailed = (\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): ExecutingFailedAction => ({\r\n type: CommandStatus.EXECUTING_FAILED,\r\n id,\r\n aggregateType: undefined,\r\n commandType,\r\n contextType,\r\n});\r\n","export enum PRODUCT_ERROR {\r\n UNKNOWN_ERROR,\r\n NOT_FOUND,\r\n}\r\n\r\nexport enum Affaerssystem {\r\n BRP = 1,\r\n PastellData = 2,\r\n}\r\n\r\nexport enum ProductTypes {\r\n Medlemskap,\r\n Traeningskort,\r\n Klippkort,\r\n Traeningskort_Dag,\r\n Traeningskort_Pensionar,\r\n Traeningskort_Student,\r\n Traeningskort_Tonaring,\r\n Nationellt_Traeningskort,\r\n Gratis_Nationellt_Traeningskort,\r\n Tvaafoereningskort,\r\n}\r\n\r\nexport type ProductWhos = 'Pensionar' | 'Student' | 'Tonaring' | 'Vuxen';\r\nexport type ProductWhens = 'Dag' | 'DygnetRunt';\r\nexport type ProductHows = 'MANUAL_DEBIT' | 'RECURRING_CARD_PAYMENT' | 'DIRECT_DEBIT_SE' | 'DIRECT_DEBIT_NO';\r\n\r\nexport enum ShopFilterCategoryName {\r\n ProductWho = 'ProductWho',\r\n ProductWhere = 'ProductWhere',\r\n ProductWhen = 'ProductWhen',\r\n ProductHow = 'ProductHow',\r\n}\r\n\r\nexport interface ShopFilter {\r\n ProductWho: string[];\r\n ProductWhere: string[];\r\n ProductWhen: string[];\r\n ProductHow: string[];\r\n}\r\n\r\nexport interface FilterCategory {\r\n SitecoreId: string;\r\n Name: string;\r\n Description: string;\r\n Type: string;\r\n Children: FilterChoice[];\r\n}\r\n\r\nexport interface FilterChoice {\r\n SitecoreId: string;\r\n Name: string;\r\n Description: string;\r\n Type: string;\r\n isSelected: boolean;\r\n}\r\n\r\nexport type ShopFilterCategoryNames = 'ProductWho' | 'ProductWhere' | 'ProductWhen' | 'ProductHow';\r\n","import { ProductHows, ProductWhens, ProductWhos, ShopFilter } from './shopModels';\r\nimport { ShopFilterCategoryNames } from './shopModels';\r\n\r\nexport enum ShopActionType {\r\n Fetch_Products = 'FETCH_PRODUCTS',\r\n Fetch_FilterCategories = 'FETCH_FILTERCATEGORIES',\r\n Shop_FilterProductsUsingFilterOptions = 'SHOP:_FILTER_PRODUCTS_USING_FILTER_OPTIONS',\r\n Shop_UpdateUserSelectedFilterOptions = 'SHOP:_UPDATE_FILTER_OPTIONS',\r\n Shop_UpdateUserSelectedFilterOptionsProperty = 'SHOP:_UPDATE_FILTER_OPTIONS_PROPERTY',\r\n Shop_ClearUserSelectedFilterOptionsProperty = 'SHOP:_CLEAR_FILTER_OPTIONS_PROPERTY',\r\n Shop_SetProductFilterWithPristineUnfilteredProducts = 'SHOP:_SET_PRODUCT_FILTER_WITH_PRISTINE_UNFILTERED_PRODUCTS',\r\n Shop_ResetProductsFilter = 'SHOP:_RESET_USER_FILTER_OPTIONS',\r\n}\r\n\r\nexport interface FetchProducts {\r\n type: ShopActionType.Fetch_Products;\r\n products: Array;\r\n}\r\n\r\nexport interface FetchFilters {\r\n type: ShopActionType.Fetch_FilterCategories;\r\n filter: Array;\r\n}\r\n\r\nexport interface ShopActionFilterProductsUsingFilterOptions {\r\n type: ShopActionType.Shop_FilterProductsUsingFilterOptions;\r\n unfilteredProducts: fos.api.Product[];\r\n shopFilterOptions: ShopFilter;\r\n}\r\n\r\nexport interface ShopActionUpdateUserSelectedFilterOptions {\r\n type: ShopActionType.Shop_UpdateUserSelectedFilterOptions;\r\n shopFilterOptions: ShopFilter;\r\n}\r\n\r\nexport interface ShopActionUpdateFilterOptionsCategory {\r\n type: ShopActionType.Shop_UpdateUserSelectedFilterOptionsProperty;\r\n category: ShopFilterCategoryNames;\r\n propertyValue: string[] | ProductWhos[] | ProductWhens[] | ProductHows[];\r\n}\r\n\r\nexport interface ShopActionClearFilterOptionsCategory {\r\n type: ShopActionType.Shop_ClearUserSelectedFilterOptionsProperty;\r\n category: ShopFilterCategoryNames;\r\n}\r\n\r\nexport interface ShopActionSetProductFilterWithPristineUnfilteredProducts {\r\n type: ShopActionType.Shop_SetProductFilterWithPristineUnfilteredProducts;\r\n unfilteredProducts: fos.api.Product[];\r\n}\r\n\r\nexport interface ShopActionResetProductsFilter {\r\n type: ShopActionType.Shop_ResetProductsFilter;\r\n}\r\n\r\nexport const fetchProducts = (products: Array): FetchProducts => ({\r\n type: ShopActionType.Fetch_Products,\r\n products,\r\n});\r\n\r\nexport const fetchFilters = (filter: Array): FetchFilters => ({\r\n type: ShopActionType.Fetch_FilterCategories,\r\n filter,\r\n});\r\n\r\nexport type ShopAction =\r\n | FetchProducts\r\n | FetchFilters\r\n | ShopActionFilterProductsUsingFilterOptions\r\n | ShopActionUpdateUserSelectedFilterOptions\r\n | ShopActionUpdateFilterOptionsCategory\r\n | ShopActionClearFilterOptionsCategory\r\n | ShopActionSetProductFilterWithPristineUnfilteredProducts\r\n | ShopActionResetProductsFilter;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\n\r\nimport { FetchStatus, FetchAction, CommandStatus, EntityStatus } from '.';\r\n\r\nexport type FetchState = ReadonlyArray;\r\nconst initialFetchState: FetchState = [];\r\n\r\nconst setFetchStatus = (fetchState: FetchState, status: FetchStatus, action: FetchAction) => {\r\n const currentState: FetchStatus | undefined = fetchState.find(\r\n s =>\r\n s.id === action.id &&\r\n s.contextType === action.contextType &&\r\n ((s.aggregateType !== undefined &&\r\n action.aggregateType !== undefined &&\r\n s.aggregateType === action.aggregateType) ||\r\n (s.commandType !== undefined && action.commandType !== undefined && s.commandType === action.commandType))\r\n );\r\n\r\n // wtf?\r\n\r\n // if (currentState !== undefined) {\r\n // const index: number = fetchState.indexOf(currentState);\r\n\r\n // return _.orderBy(\r\n // [...fetchState.slice(0, index), ...fetchState.slice(index + 1, fetchState.length), status],\r\n // ['id']\r\n // );\r\n // }\r\n\r\n // return _.orderBy([...fetchState, status], ['id']);\r\n\r\n if (currentState !== undefined) {\r\n const index: number = fetchState.indexOf(currentState);\r\n\r\n return [...fetchState.slice(0, index), ...fetchState.slice(index + 1, fetchState.length), status].sort((a, b) => {\r\n return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;\r\n });\r\n }\r\n\r\n return [...fetchState, status].sort((a, b) => {\r\n return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;\r\n });\r\n};\r\n\r\nexport const fetchReducer: Reducer = (state = initialFetchState, action: Action) => {\r\n switch (action.type) {\r\n case EntityStatus.INITIAL:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.INITIAL,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.FETCHING:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.FETCHING,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.FETCHING_IN_BACKGROUND:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.FETCHING_IN_BACKGROUND,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.SUCCESS:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.SUCCESS,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.FAILED:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.FAILED,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.SAVING:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.SAVING,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.SAVING_FAILED:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.SAVING_FAILED,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case EntityStatus.DELETED:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id,\r\n contextType: action.contextType,\r\n aggregateType: action.aggregateType,\r\n commandType: undefined,\r\n status: EntityStatus.DELETED,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case CommandStatus.INITIAL:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id as string,\r\n contextType: action.contextType,\r\n aggregateType: undefined,\r\n commandType: action.commandType,\r\n status: CommandStatus.INITIAL,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case CommandStatus.EXECUTING:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id as string,\r\n contextType: action.contextType,\r\n aggregateType: undefined,\r\n commandType: action.commandType,\r\n status: CommandStatus.EXECUTING,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case CommandStatus.EXECUTED:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id as string,\r\n contextType: action.contextType,\r\n aggregateType: undefined,\r\n commandType: action.commandType,\r\n status: CommandStatus.EXECUTED,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n case CommandStatus.EXECUTING_FAILED:\r\n return setFetchStatus(\r\n state,\r\n {\r\n id: action.id as string,\r\n contextType: action.contextType,\r\n aggregateType: undefined,\r\n commandType: action.commandType,\r\n status: CommandStatus.EXECUTING_FAILED,\r\n reason: null,\r\n date: new Date(),\r\n },\r\n action\r\n );\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { FetchState } from '.';\r\n\r\nimport {\r\n ContextType,\r\n FetchStatusAggregateTypes,\r\n FetchCommandTypes,\r\n ContextTypes,\r\n EntityStatus,\r\n CommandStatus,\r\n} from './fetchModels';\r\n\r\nexport const getEntityStatus = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): EntityStatus => {\r\n const fetchStatus = state.find(\r\n s => s.id === id && s.contextType === contextType && s.aggregateType === aggregateType\r\n );\r\n\r\n return (fetchStatus && fetchStatus.status) as EntityStatus;\r\n};\r\n\r\nexport const getCommandStatus = (\r\n state: FetchState,\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n): CommandStatus => {\r\n const fetchStatus = state.find(s => s.id === id && s.contextType === contextType && s.commandType === commandType);\r\n return (fetchStatus && fetchStatus.status) as CommandStatus;\r\n};\r\n\r\nexport const getIsFetching = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.FETCHING;\r\n\r\nexport const getIsFetchingInBackgound = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.FETCHING_IN_BACKGROUND;\r\n\r\nexport const getIsFetched = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.SUCCESS;\r\n\r\nexport const getHasLoadFailed = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.FAILED;\r\n\r\nexport const getIsSaving = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.SAVING;\r\n\r\nexport const getHasSaveFailed = (\r\n state: FetchState,\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => getEntityStatus(state, id, aggregateType, contextType) === EntityStatus.SAVING_FAILED;\r\n\r\nexport const getIsExecuting = (\r\n state: FetchState,\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => {\r\n return getCommandStatus(state, id, commandType, contextType) === CommandStatus.EXECUTING;\r\n};\r\n\r\nexport const getIsExecuted = (\r\n state: FetchState,\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => {\r\n return getCommandStatus(state, id, commandType, contextType) === CommandStatus.EXECUTED;\r\n};\r\n\r\nexport const getIsExecutingFailed = (\r\n state: FetchState,\r\n id: string,\r\n commandType: FetchCommandTypes,\r\n contextType: ContextType = ContextTypes.MITT_FRISKIS\r\n) => {\r\n return getCommandStatus(state, id, commandType, contextType) === CommandStatus.EXECUTING_FAILED;\r\n};\r\n","import { createBasket } from './../basket/basketActions';\r\nimport { setActiveFoerening, setInloggadeFoereningar } from 'store/global/session';\r\nimport { addError } from './../global/errors/errorsActions';\r\nimport { api } from 'api';\r\nimport { PRODUCT_ERROR, fetchProducts, fetchFilters } from './';\r\nimport { Dispatch } from 'redux';\r\nimport { Action, RootState, ThunkAction } from 'store';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from '../global/fetch';\r\n\r\nexport const getSubscriptionsDetails =\r\n (kort: fos.api.Medlemskap, foereningsId: number) =>\r\n (dispatch: Dispatch, getState: () => RootState): Promise => {\r\n const resultPromise = new Promise(async (resolve, reject: (reason: PRODUCT_ERROR) => void) => {\r\n const res = await api.get(\r\n `Produkter/GetMedlemskapKortDetaljer/${kort.ProductId}?foereningsId=${foereningsId}`,\r\n {\r\n muteErrorNotificationOnStatus: [404],\r\n }\r\n );\r\n\r\n if (res.error) {\r\n if (res.result.http && res.result.http.status === 404) {\r\n reject(PRODUCT_ERROR.NOT_FOUND);\r\n dispatch(\r\n addError({\r\n ...res.result,\r\n message: 'Det går inte att köpa denna produkt',\r\n })\r\n );\r\n } else {\r\n reject(PRODUCT_ERROR.UNKNOWN_ERROR);\r\n }\r\n } else {\r\n resolve(res.result);\r\n }\r\n });\r\n return resultPromise;\r\n };\r\n\r\nexport const getTrainingCardDetails =\r\n (kort: fos.api.Traeningskort, foereningsId: number): ThunkAction =>\r\n (dispatch, getState): Promise => {\r\n dispatch(fetching(kort.Id, FetchStatusAggregateTypes.PRODUCT_INFO));\r\n const resultPromise = new Promise(async (resolve, reject: (reason: PRODUCT_ERROR) => void) => {\r\n const res = await api.get(\r\n `Produkter/GetTraeningsKortDetaljer/${kort.ProductId}?foereningsId=${foereningsId}`,\r\n {\r\n muteErrorNotificationOnStatus: [404],\r\n }\r\n );\r\n\r\n if (res.error) {\r\n if (res.result.http && res.result.http.status === 404) {\r\n reject(PRODUCT_ERROR.NOT_FOUND);\r\n } else {\r\n reject(PRODUCT_ERROR.UNKNOWN_ERROR);\r\n }\r\n dispatch(fetchedFailed(kort.Id, FetchStatusAggregateTypes.PRODUCT_INFO));\r\n } else {\r\n resolve(res.result);\r\n dispatch(fetched(kort.Id, FetchStatusAggregateTypes.PRODUCT_INFO, res));\r\n }\r\n });\r\n return resultPromise;\r\n };\r\n\r\nexport const getProducts =\r\n (foereningId: number): ThunkAction =>\r\n (dispatch: Dispatch, getState: () => RootState): Promise> => {\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.GET_PRODUCTS));\r\n const resultPromise = new Promise>(async (resolve, reject) => {\r\n const url = 'produkter/getproduktlist?foereningId=';\r\n const res = await api.get>(url + foereningId, {\r\n muteErrorNotificationOnStatus: [400],\r\n });\r\n\r\n if (!res.error) {\r\n dispatch(fetchProducts(res.result));\r\n resolve(res.result);\r\n\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.GET_PRODUCTS, res.result));\r\n } else {\r\n if (res.result) {\r\n reject(new Error(res.result.message));\r\n } else {\r\n reject(new Error());\r\n }\r\n }\r\n });\r\n return resultPromise;\r\n };\r\n\r\n// NY KOD\r\nexport const getFilters =\r\n (foereningId: number): ThunkAction =>\r\n (dispatch, getState) => {\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.GET_FILTER));\r\n\r\n const url = 'WebShop/GetAllFilters';\r\n const promise = api.get>(url, {\r\n muteErrorNotificationOnStatus: [400],\r\n });\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.GET_FILTER, result.result));\r\n dispatch(fetchFilters(result.result));\r\n }\r\n });\r\n };\r\nexport const getProductsAndInitSession =\r\n (foereningName: string): ThunkAction =>\r\n dispatch => {\r\n const promise = api.get<{ Produkter: fos.api.Product[] } & fos.api.InloggadeFoerening>(\r\n 'produkter/GetProdukterAndFoerening?name=' + foereningName\r\n );\r\n\r\n dispatch(fetching('-1', FetchStatusAggregateTypes.GET_PRODUCTS));\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(fetchProducts(result.result.Produkter));\r\n dispatch(setActiveFoerening(result.result.Id));\r\n dispatch(createBasket(result.result.Id));\r\n dispatch(\r\n setInloggadeFoereningar([\r\n {\r\n Id: result.result.Id,\r\n Namn: result.result.Namn,\r\n CountryId: result.result.CountryId,\r\n HasAutoGiro: result.result.HasAutoGiro,\r\n HarNationelltTraeningsKort: result.result.HarNationelltTraeningsKort,\r\n AerButikAktiv: result.result.AerButikAktiv,\r\n DisplayName: result.result.DisplayName,\r\n OnlinetraeningStatus: result.result.OnlinetraeningStatus,\r\n // Set from GetExtraInfo\r\n ExtraFoereningInfo: { ExternalUrl: '', OnlineTrainingUrl: '' },\r\n },\r\n ])\r\n );\r\n dispatch(fetched('-1', FetchStatusAggregateTypes.GET_PRODUCTS, result.result));\r\n } else {\r\n dispatch(fetchedFailed('-1', FetchStatusAggregateTypes.GET_PRODUCTS));\r\n }\r\n });\r\n };\r\n","import { ProductHows, ProductWhens, ProductWhos, ShopFilter, ShopFilterCategoryNames } from './shopModels';\r\n\r\nimport {\r\n ShopActionType,\r\n ShopActionFilterProductsUsingFilterOptions,\r\n ShopActionUpdateUserSelectedFilterOptions,\r\n ShopActionUpdateFilterOptionsCategory,\r\n ShopActionClearFilterOptionsCategory,\r\n ShopActionSetProductFilterWithPristineUnfilteredProducts,\r\n ShopActionResetProductsFilter,\r\n} from './shopActions';\r\n\r\nexport const filterProductsUsingFilterOptions = (\r\n unfilteredProducts: fos.api.Product[],\r\n shopFilterOptions: ShopFilter\r\n): ShopActionFilterProductsUsingFilterOptions => ({\r\n type: ShopActionType.Shop_FilterProductsUsingFilterOptions,\r\n unfilteredProducts: unfilteredProducts,\r\n shopFilterOptions: shopFilterOptions,\r\n});\r\n\r\nexport const updateUserSelectedFilterOptions = (\r\n shopFilterOptions: ShopFilter\r\n): ShopActionUpdateUserSelectedFilterOptions => ({\r\n type: ShopActionType.Shop_UpdateUserSelectedFilterOptions,\r\n shopFilterOptions: shopFilterOptions,\r\n});\r\n\r\nexport const updateShopFilterOptionsCategory = (\r\n category: ShopFilterCategoryNames,\r\n propertyValue: string[] | ProductWhos[] | ProductWhens[] | ProductHows[]\r\n): ShopActionUpdateFilterOptionsCategory => ({\r\n type: ShopActionType.Shop_UpdateUserSelectedFilterOptionsProperty,\r\n category: category,\r\n propertyValue: propertyValue,\r\n});\r\n\r\nexport const clearShopFilterOptionsCategory = (\r\n category: ShopFilterCategoryNames\r\n): ShopActionClearFilterOptionsCategory => ({\r\n type: ShopActionType.Shop_ClearUserSelectedFilterOptionsProperty,\r\n category: category,\r\n});\r\n\r\nexport const setProductFilterWithPristineUnfilteredProducts = (\r\n unfilteredProducts: fos.api.Product[]\r\n): ShopActionSetProductFilterWithPristineUnfilteredProducts => ({\r\n type: ShopActionType.Shop_SetProductFilterWithPristineUnfilteredProducts,\r\n unfilteredProducts: unfilteredProducts,\r\n});\r\n\r\nexport const updateShopResetProductsFilter = (): ShopActionResetProductsFilter => ({\r\n type: ShopActionType.Shop_ResetProductsFilter,\r\n});\r\n","import { Action } from 'store';\r\nimport { ShopActionType } from './';\r\nimport { ShopFilter, ShopFilterCategoryName, ShopFilterCategoryNames } from './shopModels';\r\n\r\nexport * from './shopDispatches';\r\n\r\nexport interface ShopRootState {\r\n unfilteredProducts: fos.api.Product[];\r\n filteredProducts: fos.api.Product[];\r\n /**\r\n * Meant to be filled upon user selection of filters\r\n */\r\n userSelectedFilterOptions: ShopFilter;\r\n fullSetOfFilterProperties: ShopFilter;\r\n\r\n filteredFilterCategories: fos.api.FilterCategory[];\r\n}\r\n\r\nconst emptyFilters: ShopFilter = {\r\n ProductWho: [],\r\n ProductWhere: [],\r\n ProductWhen: [],\r\n ProductHow: [],\r\n};\r\n\r\nconst initialState: ShopRootState = {\r\n unfilteredProducts: [],\r\n filteredProducts: [],\r\n userSelectedFilterOptions: JSON.parse(JSON.stringify(emptyFilters)),\r\n fullSetOfFilterProperties: JSON.parse(JSON.stringify(emptyFilters)),\r\n filteredFilterCategories: [],\r\n};\r\n\r\n/**\r\n * Uses the filters to return an array of products matching the filter criteria.\r\n * @param {fos.api.Product[]} items\r\n * @param {ShopFilter} userFilters\r\n * @returns {fos.api.Product[]}\r\n */\r\nfunction getFilteredItems(items: fos.api.Product[], userFilters: ShopFilter): fos.api.Product[] {\r\n // TODO: Complete with other properties\r\n /* eslint-disable no-lone-blocks */\r\n let filteredItems: fos.api.Product[] = [...items];\r\n {\r\n // For Who\r\n\r\n if (userFilters.ProductWho && userFilters.ProductWho.length) {\r\n filteredItems = filteredItems.filter((product: fos.api.Product) => {\r\n return userFilters.ProductWho.find(who => who === product.ProductWho);\r\n });\r\n }\r\n }\r\n {\r\n // For Where\r\n // if (userFilters.ProductWho && userFilters.ProductWho.length) {\r\n // filteredItems = items.filter(, (product: fos.api.Product) => {\r\n // return userFilters.find(.ProductWho, (who) => who === product.ProductWho);\r\n // });\r\n // }\r\n }\r\n {\r\n // For When\r\n\r\n if (userFilters.ProductWhen && userFilters.ProductWhen.length) {\r\n filteredItems = filteredItems.filter((product: fos.api.Product) => {\r\n return userFilters.ProductWhen.find(who => who === product.ProductWhen);\r\n });\r\n }\r\n }\r\n {\r\n // For How\r\n\r\n if (userFilters.ProductHow && userFilters.ProductHow.length) {\r\n filteredItems = filteredItems.filter((product: fos.api.Product) => {\r\n return userFilters.ProductHow.find(who => who === product.ProductHow);\r\n });\r\n }\r\n }\r\n /* eslint-enable no-lone-blocks */\r\n return filteredItems;\r\n}\r\n\r\n/**\r\n * Creates the ScheduleFilter object with all filterable properties snatched from the pristine products data set.\r\n * The only argument is the pristine data set from the server.\r\n *\r\n * @param {fos.api.Product[]} products\r\n * @returns {ShopFilter}\r\n */\r\nexport const snatchFilterPropertiesFromProductData = (products: fos.api.Product[]): ShopFilter => {\r\n const snatchedFilter: ShopFilter = {\r\n ...JSON.parse(JSON.stringify(emptyFilters)),\r\n ProductWho: getPropertyValuesForProperty(ShopFilterCategoryName.ProductWho, products),\r\n ProductWhere: [],\r\n ProductWhen: getPropertyValuesForProperty(ShopFilterCategoryName.ProductWhen, products),\r\n ProductHow: getPropertyValuesForProperty(ShopFilterCategoryName.ProductHow, products),\r\n };\r\n\r\n return snatchedFilter;\r\n};\r\n\r\nexport function getPropertyValuesForProperty(property: ShopFilterCategoryNames, products: fos.api.Product[]): string[] {\r\n let values: string[] = [];\r\n products.forEach((product, index) => {\r\n switch (property) {\r\n case ShopFilterCategoryName.ProductWho: {\r\n if (values.indexOf(product.ProductWho) === -1 && !!product.ProductWho) values.push(product.ProductWho);\r\n break;\r\n }\r\n case ShopFilterCategoryName.ProductWhen: {\r\n if (values.indexOf(product.ProductWhen) === -1 && !!product.ProductWhen) values.push(product.ProductWhen);\r\n break;\r\n }\r\n case ShopFilterCategoryName.ProductHow: {\r\n if (values.indexOf(product.ProductHow) === -1 && !!product.ProductHow) values.push(product.ProductHow);\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n });\r\n return values;\r\n}\r\n\r\nexport const ProductReducer = (state: ShopRootState = initialState, action: Action): ShopRootState => {\r\n switch (action.type) {\r\n case ShopActionType.Fetch_FilterCategories: {\r\n // FÖRSTA HÄMTNIGNEN\r\n const stringifiedCachedFilterCategories = JSON.stringify(action.filter);\r\n const cachedFilteredFilterCategories = JSON.parse(stringifiedCachedFilterCategories);\r\n\r\n return { ...state, filteredFilterCategories: cachedFilteredFilterCategories };\r\n }\r\n case ShopActionType.Fetch_Products: {\r\n const cachedUnfilteredProducts = action.products;\r\n const cachedFilteredFilterCategories = [...state.filteredFilterCategories];\r\n cachedFilteredFilterCategories.forEach(f => {\r\n f.Children = f.Children.filter(\r\n c => !!cachedUnfilteredProducts.find(p => !!p.FilterVal.find(fv => fv === c.SitecoreId))\r\n );\r\n });\r\n const cachedFilteredProducts = getFilteredItems(cachedUnfilteredProducts, state.userSelectedFilterOptions);\r\n const cachedFullSetOfPropertiesSnatchedFromScheduleData = snatchFilterPropertiesFromProductData(\r\n cachedUnfilteredProducts\r\n );\r\n return {\r\n ...state,\r\n unfilteredProducts: cachedUnfilteredProducts,\r\n filteredProducts: cachedFilteredProducts,\r\n fullSetOfFilterProperties: cachedFullSetOfPropertiesSnatchedFromScheduleData,\r\n filteredFilterCategories: cachedFilteredFilterCategories,\r\n };\r\n }\r\n case ShopActionType.Shop_UpdateUserSelectedFilterOptionsProperty: {\r\n const cachedUserFilters = { ...state.userSelectedFilterOptions };\r\n cachedUserFilters[action.category] = action.propertyValue;\r\n const cachedFilteredProducts = getFilteredItems(state.unfilteredProducts, cachedUserFilters);\r\n return {\r\n ...state,\r\n userSelectedFilterOptions: { ...cachedUserFilters },\r\n filteredProducts: { ...cachedFilteredProducts },\r\n };\r\n }\r\n case ShopActionType.Shop_ClearUserSelectedFilterOptionsProperty: {\r\n const cachedUserFilters = { ...state.userSelectedFilterOptions };\r\n cachedUserFilters[action.category] = [];\r\n\r\n const cachedFilteredProducts = getFilteredItems(state.unfilteredProducts, cachedUserFilters);\r\n return {\r\n ...state,\r\n userSelectedFilterOptions: { ...cachedUserFilters },\r\n filteredProducts: { ...cachedFilteredProducts },\r\n };\r\n }\r\n case ShopActionType.Shop_ResetProductsFilter: {\r\n const cachedUserFilters = JSON.parse(JSON.stringify(emptyFilters));\r\n const cachedFilteredProducts = getFilteredItems(state.unfilteredProducts, cachedUserFilters);\r\n return {\r\n ...state,\r\n userSelectedFilterOptions: { ...cachedUserFilters },\r\n filteredProducts: { ...cachedFilteredProducts },\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { Affaerssystem } from 'store/shop';\r\n\r\nexport const getPurchaseErrorMessage = (\r\n translate: TranslateFunction,\r\n error: string | undefined,\r\n provider: number | undefined\r\n): string | undefined => {\r\n const defaultError = (translate(SitecoreDictionary.PaymentErrorMessages.GeneralError) as string) || 'Okänt fel!';\r\n if (!error) {\r\n return;\r\n }\r\n if (!provider) {\r\n return defaultError;\r\n }\r\n\r\n switch (provider.toString()) {\r\n case Affaerssystem.BRP.toString(): {\r\n switch (error) {\r\n case '10':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f10) as string;\r\n case '101':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f101) as string;\r\n case '102':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f102) as string;\r\n case '103':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f103) as string;\r\n case '104':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f104) as string;\r\n case '105':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f105) as string;\r\n case '106':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f106) as string;\r\n case '107':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f107) as string;\r\n case '110':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f110) as string;\r\n case '13':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f13) as string;\r\n case '14':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f14) as string;\r\n case '15':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f15) as string;\r\n case '200':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f200) as string;\r\n case '201':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f201) as string;\r\n case '202':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f202) as string;\r\n case '203':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f203) as string;\r\n case '204':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f204) as string;\r\n case '205':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f205) as string;\r\n case '206':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f206) as string;\r\n case '207':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f207) as string;\r\n case '9':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.BRP.f9) as string;\r\n default:\r\n return defaultError;\r\n }\r\n }\r\n case Affaerssystem.PastellData.toString(): {\r\n switch (error) {\r\n case 'ERROR':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.PastellData.ERROR) as string;\r\n case 'CANCEL':\r\n return translate(SitecoreDictionary.PaymentErrorMessages.PastellData.CANCEL) as string;\r\n default:\r\n return defaultError;\r\n }\r\n }\r\n default:\r\n return defaultError;\r\n }\r\n};\r\n","export const getQueryStringValue = (key: string): string => {\r\n return decodeURIComponent(\r\n window.location.search.replace(\r\n new RegExp('^(?:.*[&\\\\?]' + encodeURIComponent(key).replace(/[.+*]/g, '\\\\$&') + '(?:\\\\=([^&]*))?)?.*$', 'i'),\r\n '$1'\r\n )\r\n );\r\n};\r\n","function registerOutsideClickHandler(listener: (ev?: MouseEvent) => void) {\r\n document.addEventListener('click', listener, false);\r\n}\r\n\r\nfunction deleteOutsideClickHandler(listener: (ev?: MouseEvent) => void) {\r\n document.removeEventListener('click', listener, false);\r\n}\r\n\r\nexport const OutsideClickHandler = {\r\n register: registerOutsideClickHandler,\r\n delete: deleteOutsideClickHandler,\r\n};\r\n\r\n/**\r\n * This method will invoke a callback when when the scroll is stopped\r\n * @param callback The callback Function to run when the scroll is stopped\r\n * @param element an optional HTMLElement, when provided it'll listen on the scroll event on it otherwise on the document\r\n */\r\nexport const onScrollStop = (callback: Function, element?: HTMLElement) => {\r\n // https://gomakethings.com/detecting-when-a-visitor-has-stopped-scrolling-with-vanilla-javascript/\r\n let isScrolling: number;\r\n const container: HTMLElement | Window = element || window;\r\n // Listen for scroll events\r\n container.addEventListener(\r\n 'scroll',\r\n event => {\r\n // Clear our timeout throughout the scroll\r\n window.clearTimeout(isScrolling);\r\n\r\n // Set a timeout to run after scrolling ends\r\n isScrolling = window.setTimeout(() => callback(), 500);\r\n },\r\n false\r\n );\r\n};\r\n","export const getActiveFoerening = (\r\n inloggadeFoerening: fos.api.InloggadeFoerening[],\r\n foereningId?: number\r\n): fos.api.InloggadeFoerening | undefined => {\r\n if (!foereningId) {\r\n return;\r\n }\r\n return inloggadeFoerening.find(f => f.Id.toString() === foereningId.toString()) || undefined;\r\n};\r\n","import { ShopFilterCategoryState } from 'store/global/ui/shop-filter';\r\nimport { ScheduleFilterCategoryState } from 'store/global/ui/schedule-filter';\r\n\r\nfunction hasCategoryExpanded(categoryState: ShopFilterCategoryState | ScheduleFilterCategoryState): boolean {\r\n const categoryKeys = Object.keys(categoryState);\r\n let filterHasAnExpandedCategory = !!categoryKeys.find(categoryName => {\r\n return categoryState[categoryName].atTop;\r\n });\r\n\r\n return filterHasAnExpandedCategory;\r\n}\r\n\r\nexport const filterUtils = {\r\n hasCategoryExpanded,\r\n};\r\n","import { store } from './../index';\r\nimport { getTranslate } from 'store/global/dictionary/dictionary';\r\nimport { SitecoreDictionary } from 'models';\r\nexport enum SPECIAL_INTRESSE_TAGS {\r\n 'Children 0-5',\r\n 'Children 13-18',\r\n 'Children 6-12',\r\n 'Beginner',\r\n 'Easy',\r\n 'Hard',\r\n 'Medium',\r\n}\r\n\r\nexport const TranslateIfSpecialIntresse = (str: string): string => {\r\n const translate = getTranslate(store.getState().locale);\r\n\r\n if (str in SPECIAL_INTRESSE_TAGS) {\r\n return translate(SitecoreDictionary.TrainingPreferences.Preferences + str) as string;\r\n }\r\n return str;\r\n};\r\n","export const constructSafeName = (str: string): string =>\r\n str\r\n .replace(new RegExp('ö', 'g'), 'o')\r\n .replace(new RegExp('å', 'g'), 'a')\r\n .replace(new RegExp('ä', 'g'), 'a')\r\n .replace(new RegExp('Ö', 'g'), 'O')\r\n .replace(new RegExp('Å', 'g'), 'A')\r\n .replace(new RegExp('Ä', 'g'), 'A')\r\n .replace(new RegExp('/', 'g'), '');\r\n","import { Day } from 'models';\r\n\r\nfunction isBookedPassCancelled(bokning: fos.api.Bokning, passList: Day[]): boolean {\r\n if (!bokning || !passList || passList.length < 1) {\r\n return false;\r\n }\r\n const day = passList.find(p => p.key === bokning.Day);\r\n if (!!day) {\r\n const pass = day.items.find(p => p.PassId === bokning.PassId);\r\n if (!!pass) {\r\n return pass.AerInstaelld;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nexport const PassUtils = {\r\n isBookedPassCancelled,\r\n};\r\n","export enum FoereningSwitcherActionTypes {\r\n TOOGLE_SWITCHER = 'UI_FOERENING_SWITCHER/TOOGLE',\r\n IS_SWITCHING = 'UI_FOERENING_SWITCHER/IS_SWITHCING',\r\n}\r\n\r\nexport interface FoereningSwitcherToogleAction {\r\n type: FoereningSwitcherActionTypes.TOOGLE_SWITCHER;\r\n value: boolean;\r\n}\r\n\r\nexport interface FoereningSwitcherIsSwitchingAction {\r\n type: FoereningSwitcherActionTypes.IS_SWITCHING;\r\n value: boolean;\r\n}\r\n\r\nexport const toogleFoereningSwitcher = (isVisible: boolean): FoereningSwitcherToogleAction => ({\r\n type: FoereningSwitcherActionTypes.TOOGLE_SWITCHER,\r\n value: isVisible,\r\n});\r\n\r\nexport const isSwitchingFoereningSwitcher = (isSwitching: boolean): FoereningSwitcherIsSwitchingAction => ({\r\n type: FoereningSwitcherActionTypes.IS_SWITCHING,\r\n value: isSwitching,\r\n});\r\n\r\nexport type FoereningSwitcherActions = FoereningSwitcherToogleAction | FoereningSwitcherIsSwitchingAction;\r\n","import { ProductTypes } from 'store/shop';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport type CouldAddProduct = CanAddProduct | CannotAddProduct;\r\n\r\nexport interface CanAddProduct {\r\n canAdd: true;\r\n}\r\n\r\nexport interface CannotAddProduct {\r\n canAdd: false;\r\n message: string;\r\n}\r\n\r\nexport const canAddProduct = (\r\n product: fos.api.Product,\r\n translate: TranslateFunction,\r\n productsInBasket: fos.api.Product[] | undefined,\r\n isPendingOrderChange: boolean\r\n): CouldAddProduct => {\r\n if (isPendingOrderChange) {\r\n return { canAdd: false, message: '' };\r\n }\r\n // Om vi försöker lägga till ett träningskort\r\n if (product.Types.find(t => t === ProductTypes.Traeningskort || t === ProductTypes.Tvaafoereningskort)) {\r\n if (!!productsInBasket) {\r\n const typesInBasket = productsInBasket.map(p => p.Types).reduce((a, b) => a.concat(b), []);\r\n // kolla om det redan finns träningskort\r\n if (typesInBasket.find(t => t === ProductTypes.Traeningskort || t === ProductTypes.Tvaafoereningskort)) {\r\n return {\r\n canAdd: false,\r\n message: translate(SitecoreDictionary.Shop.CanOnlyAddOneOfTypeTraeningsKort) as string,\r\n };\r\n }\r\n }\r\n }\r\n return { canAdd: true };\r\n};\r\n","import { ThunkAction } from 'store/rootReducer';\r\nimport { updateFoereningId } from '.';\r\nimport { constructSafeName } from 'utils';\r\n\r\nexport const setFoereningIdFromQueryParameter = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const foerening = state.foereningar.read.Foereningar.find(\r\n f => constructSafeName(f.Namn.toLowerCase()) === constructSafeName(state.location.query.foerening.toLowerCase())\r\n );\r\n if (foerening) {\r\n dispatch(updateFoereningId(foerening.Id));\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { AuthReadActions, AuthReadReducer, AuthReadState } from './read';\r\nimport { LoginCmdActions, LoginCmdState, loginCmdReducer } from './loginCmd';\r\n\r\nexport type AuthActions = AuthReadActions | LoginCmdActions;\r\n\r\nexport interface AuthRootState {\r\n read: AuthReadState;\r\n loginCmd: LoginCmdState;\r\n}\r\n\r\nexport const AuthReducer = combineReducers({\r\n read: AuthReadReducer,\r\n loginCmd: loginCmdReducer,\r\n});\r\n","import { Day } from 'models';\r\n\r\nexport enum PassActionType {\r\n Day_UpdateDay = 'DAY_UPDATE_DAY',\r\n UpdateBokaPassStatus = 'UPDATE_BOKA_PASS_UI',\r\n}\r\n\r\nexport interface DayUpdateDayReadAction {\r\n type: PassActionType.Day_UpdateDay;\r\n days: Array>;\r\n}\r\n\r\nexport interface UpdateBokaPassStatusAction {\r\n type: PassActionType.UpdateBokaPassStatus;\r\n passId: string | number;\r\n message: string;\r\n key: string;\r\n}\r\nexport const updateDayData = (passData: Array>): DayUpdateDayReadAction => ({\r\n type: PassActionType.Day_UpdateDay,\r\n days: passData,\r\n});\r\n\r\nexport const updateBokaPassStatus = (\r\n passId: string | number,\r\n message: string,\r\n key: string\r\n): UpdateBokaPassStatusAction => ({\r\n type: PassActionType.UpdateBokaPassStatus,\r\n passId: passId,\r\n message: message,\r\n key: key,\r\n});\r\n\r\nexport type PassAction = DayUpdateDayReadAction | UpdateBokaPassStatusAction;\r\n","const onLoginSignal = () => window.parent.postMessage('GotoMittFriskis', process.env.REACT_APP_FOS_URL as string);\r\nconst onHideLoginSignal = () => window.parent.postMessage('HideLogin', process.env.REACT_APP_FOS_URL as string);\r\nconst isIframedInSitecore = () => window.self !== window.top;\r\n\r\nexport const sitecoreUtils = {\r\n onLoginSignal,\r\n isIframedInSitecore,\r\n onHideLoginSignal,\r\n};\r\n","export enum PassDetailsReadActionType {\r\n PassDetails_UpdatePassDetails = 'PASS_DETAILS_UPDATE_PASS_DETAILS',\r\n}\r\n\r\nexport interface PassDetailsUpdatePassReadAction {\r\n type: PassDetailsReadActionType.PassDetails_UpdatePassDetails;\r\n passDetails: fos.api.PassDetails;\r\n}\r\n\r\nexport const updatePassDetailsData = (passData: fos.api.PassDetails): PassDetailsUpdatePassReadAction => ({\r\n type: PassDetailsReadActionType.PassDetails_UpdatePassDetails,\r\n passDetails: passData,\r\n});\r\n\r\nexport type PassDetailsReadAction = PassDetailsUpdatePassReadAction;\r\n","import { DayViewObject } from '../../models/Day';\r\n\r\nexport enum ActionType {\r\n GetBokningar = 'GET_BOKNINGAR',\r\n RemoveBokning = 'REMOVE_BOKNING',\r\n UpdateStatusMessage = 'UPDATE_STATUS_MESSAGE',\r\n AddBokning = 'ADD_BOKNING',\r\n PopulateBokningar = 'POPULATE_BOKNINGAR',\r\n DeleteBokning = 'DELETE_BOKNING',\r\n SetNextBokning = 'SET_NEXT_BOKNING',\r\n UpdateDayExpanded = 'UPDATE_DAY_EXPANDED',\r\n}\r\n\r\nexport interface GetBokningarAction {\r\n type: ActionType.GetBokningar;\r\n payload: DayViewObject;\r\n}\r\n\r\nexport interface UpdateStatusMessageAction {\r\n type: ActionType.UpdateStatusMessage;\r\n status: string;\r\n id: string;\r\n}\r\n\r\nexport interface RemoveBokningAction {\r\n type: ActionType.RemoveBokning;\r\n bokningId: string;\r\n}\r\n\r\nexport interface AddBokningAction {\r\n type: ActionType.AddBokning;\r\n bokning: fos.api.Bokning;\r\n}\r\n\r\nexport interface PopulateBokningarAction {\r\n type: ActionType.PopulateBokningar;\r\n bokningar: Array;\r\n}\r\n\r\nexport interface DeleteBokningAction {\r\n type: ActionType.DeleteBokning;\r\n bokningId: string;\r\n}\r\n\r\nexport interface SetNextBokningAction {\r\n type: ActionType.SetNextBokning;\r\n bokning?: fos.api.Bokning;\r\n}\r\n\r\nexport interface BookingActionUpdateDayExpanded {\r\n type: ActionType.UpdateDayExpanded;\r\n dayName: string;\r\n expanded: boolean;\r\n}\r\n\r\nexport const deleteBokning = (bokningId: string): DeleteBokningAction => ({\r\n type: ActionType.DeleteBokning,\r\n bokningId,\r\n});\r\n\r\nexport const populateBokningar = (bokningar: Array): PopulateBokningarAction => ({\r\n type: ActionType.PopulateBokningar,\r\n bokningar,\r\n});\r\n\r\nexport const addBokning = (bokning: fos.api.Bokning): AddBokningAction => ({\r\n type: ActionType.AddBokning,\r\n bokning,\r\n});\r\n\r\nexport const removeBokning = (id: string): RemoveBokningAction => ({\r\n type: ActionType.RemoveBokning,\r\n bokningId: id,\r\n});\r\n\r\nexport const updateStatusMessage = (message: string, id: string): UpdateStatusMessageAction => ({\r\n type: ActionType.UpdateStatusMessage,\r\n status: message,\r\n id: id,\r\n});\r\n\r\nexport const updateBokningarUI = (Bokningar: DayViewObject): GetBokningarAction => ({\r\n type: ActionType.GetBokningar,\r\n payload: Bokningar,\r\n});\r\n\r\nexport const setNextBokning = (bokning?: fos.api.Bokning): SetNextBokningAction => ({\r\n type: ActionType.SetNextBokning,\r\n bokning,\r\n});\r\n\r\nexport const updateBookingDayExpanded = (dayName: string, expanded: boolean): BookingActionUpdateDayExpanded => ({\r\n type: ActionType.UpdateDayExpanded,\r\n dayName,\r\n expanded,\r\n});\r\n\r\nexport type BokningarAction =\r\n | GetBokningarAction\r\n | UpdateStatusMessageAction\r\n | RemoveBokningAction\r\n | AddBokningAction\r\n | PopulateBokningarAction\r\n | DeleteBokningAction\r\n | SetNextBokningAction\r\n | BookingActionUpdateDayExpanded;\r\n","import { PassActionType } from './passActions';\r\nimport { PassDetailsReadActionType } from '../../pass-details/read/passDetailsReadActions';\r\nimport { Day } from 'models';\r\nimport { Action } from 'store';\r\n\r\nexport interface PassReadState {\r\n days: Array>;\r\n}\r\n\r\nconst initialState: PassReadState = {\r\n days: [],\r\n};\r\n\r\nexport const readReducer = (state: PassReadState = initialState, action: Action): PassReadState => {\r\n switch (action.type) {\r\n case PassActionType.Day_UpdateDay: {\r\n return { ...state, days: action.days };\r\n }\r\n case PassActionType.UpdateBokaPassStatus: {\r\n const newDays = [...state.days];\r\n for (let i = 0; i < newDays.length; i++) {\r\n const pass = newDays[i].items.find(p => p.PassId === action.passId);\r\n if (!!pass) {\r\n pass.statusMessage = action.message;\r\n break;\r\n }\r\n }\r\n return { ...state, days: newDays };\r\n }\r\n case PassDetailsReadActionType.PassDetails_UpdatePassDetails: {\r\n const newDays = [...state.days];\r\n for (let i = 0; i < newDays.length; i++) {\r\n const pass = newDays[i].items.find(p => p.PassId === action.passDetails.PassId);\r\n if (!!pass) {\r\n pass.AntalBokningsbaraPlatser = action.passDetails.AntalBokningsbaraPlatser;\r\n pass.AntalBokningsbaraPlatserTotalt = action.passDetails.AntalBokningsbaraPlatserTotalt;\r\n pass.AntalDropinPlatser = action.passDetails.AntalDropinPlatser;\r\n pass.AntalIVaenteLista = action.passDetails.AntalIVaenteLista;\r\n pass.AntalLedigaPlatser = action.passDetails.AntalLedigaPlatser;\r\n pass.AntalPlatserTotal = action.passDetails.AntalPlatserTotal;\r\n pass.LedigaKoePlatser = action.passDetails.LedigaKoePlatser;\r\n break;\r\n }\r\n }\r\n return { ...state, days: newDays };\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { UIScheduleViewType } from './uiScheduleReducer';\r\nimport { UIScheduleFilterAction } from '../schedule-filter/uiScheduleFilterActions';\r\n\r\nexport enum UIScheduleActionType {\r\n SetScrollToDay = 'UI/SCHEDULE/SETSCROLLTODAY',\r\n SetDayClickedFromDayPicker = 'UI/SCHEDULE/SET_DAY_CLICKED_FROM_DAYPICKER',\r\n SetClickedFromDayPicker = 'UI/SCHEDULE/SET_CLICKED_FROM_DAYPICKER',\r\n SetViewTypeToList = 'UI_SCHEDULE_VIEWTYPE_LIST',\r\n SetViewTypeToWeek = 'UI_SCHEDULE_VIEWTYPE_WEEK',\r\n SetSelectedPass = 'UI_SCHEDULE_SET_SELECTED_PASS',\r\n SetShouldDisableSticky = 'UI_SCHEDULE_SET_SHOULD_DISABLE_STICKY',\r\n SetScrollPosition = 'UI_SCHEDULE_SET_SCROLL_POSITION',\r\n}\r\n\r\nexport type SetScrollToDayAction = {\r\n type: UIScheduleActionType.SetScrollToDay;\r\n scrollToDay: string;\r\n};\r\n\r\nexport type UISetClickedFromDayPickerAction = {\r\n type: UIScheduleActionType.SetClickedFromDayPicker;\r\n clickFromDayPicker: boolean;\r\n};\r\n\r\nexport type UISetDayClickedFromDayPickerAction = {\r\n type: UIScheduleActionType.SetDayClickedFromDayPicker;\r\n clickFromDayPickerDay: string;\r\n};\r\n\r\nexport interface UIScheduleSetViewTypeToListAction {\r\n type: UIScheduleActionType.SetViewTypeToList;\r\n viewShowing: UIScheduleViewType.LISTVIEW;\r\n}\r\n\r\nexport interface UIScheduleSetViewTypeToWeekAction {\r\n type: UIScheduleActionType.SetViewTypeToWeek;\r\n viewShowing: UIScheduleViewType.WEEKVIEW;\r\n}\r\n\r\nexport type UIScheduleSetSelectedPass = {\r\n type: UIScheduleActionType.SetSelectedPass;\r\n selectedPass: fos.api.Pass;\r\n};\r\n\r\nexport type UIScheduleSetShouldDisableSticky = {\r\n type: UIScheduleActionType.SetShouldDisableSticky;\r\n value: boolean;\r\n};\r\n\r\nexport type UIScheduleSetScrollPosition = {\r\n type: UIScheduleActionType.SetScrollPosition;\r\n scrollTop: number;\r\n scrollBottom: number;\r\n scrollRightPercent: number;\r\n};\r\n\r\nexport type UIScheduleAction =\r\n | SetScrollToDayAction\r\n | UIScheduleSetViewTypeToListAction\r\n | UIScheduleSetViewTypeToWeekAction\r\n | UIScheduleFilterAction\r\n | UIScheduleSetSelectedPass\r\n | UIScheduleSetShouldDisableSticky\r\n | UISetDayClickedFromDayPickerAction\r\n | UISetClickedFromDayPickerAction\r\n | UIScheduleSetScrollPosition;\r\n","import { Action } from 'store';\r\nimport { ActionType } from './bokningarAction';\r\nimport { DayViewObject } from '../../models/Day';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nexport interface BokningarRootState {\r\n bokningar: Array;\r\n days: DayViewObject;\r\n nextBokning?: fos.api.Bokning;\r\n hasFetchedBokningarOnce: boolean;\r\n}\r\n\r\nconst initialState: BokningarRootState = {\r\n days: {},\r\n bokningar: [],\r\n hasFetchedBokningarOnce: false,\r\n};\r\n\r\n// const getBokningByBokningId = (days: DayViewObject, key: string, id: string): fos.api.Bokning | undefined => {\r\n// let day = days[key];\r\n// let bokning = day.items.find(item => item.BokningId === id);\r\n// return bokning;\r\n// };\r\n\r\n/*\r\n Update a object of fos.api.Bokning with statusMessage and sets readyToDelete if statusMessage is OK_CANCEL\r\n*/\r\nconst updateBokning = (days: DayViewObject, id: string, message: string) => {\r\n let keys = Object.keys(days);\r\n let key = keys.find(k => days[k].items && !!days[k].items.find(b => b.BokningId.toString() === id));\r\n if (!key) {\r\n return days;\r\n }\r\n let day = days[key];\r\n for (let i = 0; i < day.items.length; i++) {\r\n if (id === day.items[i].BokningId) {\r\n day.items[i].statusMessage = message;\r\n\r\n if (message === SitecoreDictionary.Schedule.Messages.OK_CANCEL) {\r\n day.items[i].readyToDelete = true;\r\n }\r\n break;\r\n }\r\n }\r\n days[key] = day;\r\n return days;\r\n};\r\n\r\nexport const BokningarReducer = (state = initialState, action: Action): BokningarRootState => {\r\n switch (action.type) {\r\n case ActionType.SetNextBokning:\r\n return {\r\n ...state,\r\n nextBokning: action.bokning,\r\n };\r\n case ActionType.DeleteBokning:\r\n return { ...state, bokningar: state.bokningar.filter(b => b.BokningId !== action.bokningId) };\r\n\r\n case ActionType.PopulateBokningar:\r\n return { ...state, hasFetchedBokningarOnce: true, bokningar: action.bokningar };\r\n\r\n case ActionType.AddBokning:\r\n return { ...state, hasFetchedBokningarOnce: true, bokningar: [...state.bokningar, action.bokning] };\r\n\r\n case ActionType.UpdateStatusMessage:\r\n const days: DayViewObject = updateBokning(state.days, action.id, action.status);\r\n return { ...state, days: days };\r\n\r\n case ActionType.RemoveBokning:\r\n let newDays = { ...state.days };\r\n\r\n for (let key of Object.keys(newDays)) {\r\n for (let i = 0; i < newDays[key].items.length; i++) {\r\n if (action.bokningId === newDays[key].items[i].BokningId) {\r\n if (newDays[key].items[i].readyToDelete) {\r\n newDays[key].items.splice(i, 1);\r\n }\r\n if (newDays[key].items.length < 1) {\r\n delete newDays[key];\r\n }\r\n\r\n if (Object.keys(newDays).length < 1) {\r\n newDays = {};\r\n }\r\n return { ...state, days: newDays };\r\n }\r\n }\r\n }\r\n return { ...state };\r\n case ActionType.GetBokningar:\r\n return { ...state, days: action.payload };\r\n case ActionType.UpdateDayExpanded:\r\n let daysList = state.days;\r\n const relevantDay = daysList[action.dayName];\r\n daysList = {\r\n ...daysList,\r\n [action.dayName]: {\r\n ...relevantDay,\r\n expanded: action.expanded,\r\n },\r\n };\r\n return {\r\n ...state,\r\n days: daysList,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { readReducer, PassReadState } from './read';\r\n\r\nexport interface PassRootState {\r\n read: PassReadState;\r\n // TODO write: WriteState;\r\n}\r\n\r\nexport const passReducer = combineReducers({\r\n read: readReducer,\r\n // TODO write: writeReducer\r\n});\r\n","import { PassDetailsReadActionType } from './passDetailsReadActions';\r\nimport { UIScheduleActionType } from '../../global/ui/schedule/uiScheduleActions';\r\nimport { Action } from 'store';\r\nimport { PassActionType } from 'store/pass';\r\n\r\nexport interface PassDetailsReadState {\r\n pass?: fos.api.PassDetails;\r\n}\r\n\r\nconst initialState: PassDetailsReadState = {\r\n pass: undefined,\r\n};\r\n\r\nexport const readReducer = (state: PassDetailsReadState = initialState, action: Action): PassDetailsReadState => {\r\n switch (action.type) {\r\n case PassDetailsReadActionType.PassDetails_UpdatePassDetails: {\r\n return { ...state, pass: action.passDetails };\r\n }\r\n case UIScheduleActionType.SetSelectedPass: {\r\n if (!action.selectedPass || !state.pass || state.pass.PassId !== action.selectedPass.PassId) {\r\n return { ...state, pass: { ...state.pass, ...action.selectedPass } as fos.api.PassDetails | undefined };\r\n } else {\r\n return state;\r\n }\r\n }\r\n case PassActionType.UpdateBokaPassStatus: {\r\n if (state.pass) {\r\n if (action.passId === state.pass.PassId) {\r\n return {\r\n ...state,\r\n pass: {\r\n ...state.pass,\r\n statusMessage: action.message,\r\n },\r\n };\r\n }\r\n }\r\n return state;\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum MobileOSType {\r\n Android,\r\n iOS,\r\n}\r\ninterface WebAppInterface {\r\n // tslint:disable-next-line: no-any\r\n showToast(message: string): any;\r\n // tslint:disable-next-line: no-any\r\n askCalendarPermission(data: string): any;\r\n // tslint:disable-next-line: no-any\r\n addToCalendar(data: string): any;\r\n // tslint:disable-next-line: no-any\r\n fetchCalendars(): any;\r\n // tslint:disable-next-line: no-any\r\n setCalendarId(id: string): any;\r\n // tslint:disable-next-line: no-any\r\n openFriskisGo(): any;\r\n}\r\ndeclare var Android: WebAppInterface;\r\n\r\nclass Ios {\r\n static showToast = (message: string) => {\r\n var id = 'showToast';\r\n var data = message;\r\n var dictionaryItem = JSON.stringify({ id: id, data: data });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n\r\n static askCalendarPermission = () => {\r\n var id = 'calendarPermission';\r\n var data = '';\r\n var dictionaryItem = JSON.stringify({ id: id, data: data });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n\r\n static addToCalendar = (data: string) => {\r\n var id = 'addPass';\r\n var dictionaryItem = JSON.stringify({ id: id, data: data });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n\r\n static fetchCalendars = () => {\r\n var id = 'fetchCalendars';\r\n var data = '';\r\n var dictionaryItem = JSON.stringify({ id: id, data: data });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n\r\n static setCalendarId = (calendarId: string) => {\r\n var id = 'setCalendarId';\r\n var dictionaryItem = JSON.stringify({ id: id, data: calendarId });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n\r\n static openFriskisGo = () => {\r\n var id = 'openFriskisGo';\r\n var data = '';\r\n var dictionaryItem = JSON.stringify({ id: id, data: data });\r\n // tslint:disable-next-line: no-any\r\n (window as any).webkit.messageHandlers.iosListener.postMessage(dictionaryItem);\r\n };\r\n}\r\n\r\nclass Debug {\r\n static showToast = (message: string) => {\r\n // not implemented\r\n };\r\n\r\n static askCalendarPermission = () => {\r\n // not implemented\r\n };\r\n\r\n static addToCalendar = (data: string) => {\r\n // not implemented\r\n };\r\n\r\n static fetchCalendars = () => {\r\n // simulera att det kalendrar inte uppdateras samma frame.\r\n window.setTimeout(() => {\r\n localStorage.setItem(\r\n 'calendars',\r\n JSON.stringify([\r\n { id: '1111', name: 'test' },\r\n { id: '2222', name: 'test 2' },\r\n ])\r\n );\r\n }, 500);\r\n };\r\n\r\n static setCalendarId = (calendarId: string) => {\r\n // not implemented\r\n };\r\n\r\n static openFriskisGo = () => {\r\n // not implemented\r\n };\r\n}\r\n\r\nexport class Mobile {\r\n static showToast = (message: string) => {\r\n if (isIOS()) {\r\n Ios.showToast(message);\r\n } else if (isAndroid()) {\r\n Android.showToast(message);\r\n } else if (isDebug()) {\r\n Debug.showToast(message);\r\n }\r\n };\r\n\r\n static askCalendarPermission = () => {\r\n if (isIOS()) {\r\n Ios.askCalendarPermission();\r\n } else if (isAndroid()) {\r\n Android.askCalendarPermission('');\r\n } else if (isDebug()) {\r\n Debug.askCalendarPermission();\r\n }\r\n };\r\n\r\n static addToCalendar = (data: string) => {\r\n if (isIOS()) {\r\n Ios.addToCalendar(data);\r\n } else if (isAndroid()) {\r\n Android.addToCalendar(data);\r\n } else if (isDebug()) {\r\n Debug.addToCalendar(data);\r\n }\r\n };\r\n\r\n static fetchCalendars = () => {\r\n if (isIOS()) {\r\n Ios.fetchCalendars();\r\n } else if (isAndroid()) {\r\n Android.fetchCalendars();\r\n } else if (isDebug()) {\r\n Debug.fetchCalendars();\r\n }\r\n };\r\n\r\n static setCalendarId = (calendarId: string) => {\r\n if (isIOS()) {\r\n Ios.setCalendarId(calendarId);\r\n } else if (isAndroid()) {\r\n Android.setCalendarId(calendarId);\r\n } else if (isDebug()) {\r\n Debug.setCalendarId(calendarId);\r\n }\r\n };\r\n\r\n static openFriskisGo = () => {\r\n if (isIOS()) {\r\n Ios.openFriskisGo();\r\n } else if (isAndroid()) {\r\n Android.openFriskisGo();\r\n } else if (isDebug()) {\r\n Debug.openFriskisGo();\r\n }\r\n };\r\n}\r\n\r\nexport const isApp = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n return app !== null && parseInt(app, 10) > 0;\r\n};\r\n\r\nexport const isIOS = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n if (app !== null && parseInt(app, 10) === 1) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isAndroid = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n if (app !== null && parseInt(app, 10) === 2) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isDebug = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n if (app !== null && parseInt(app, 10) === 3) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isDebugIos = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n if (app !== null && parseInt(app, 10) === 4) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isDebugAndroid = () => {\r\n let app = localStorage.getItem('nativeApp');\r\n if (app !== null && parseInt(app, 10) === 5) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n","import { ThunkAction, RootState, Action, Dispatch } from './../rootReducer';\r\nimport { setNextBokning, updateStatusMessage } from './bokningarAction';\r\nimport { api } from 'api';\r\nimport { SortIntoDays, SortSortedIntoDaysViewObject } from 'websd/utils';\r\nimport { Day, SitecoreDictionary, getStatusMessage } from 'models';\r\nimport { populateBokningar, updateBokningarUI, deleteBokning } from '.';\r\nimport {\r\n executingCommand,\r\n FetchCommandTypes,\r\n executingCommandFailed,\r\n executedCommand,\r\n fetching,\r\n FetchStatusAggregateTypes,\r\n fetched,\r\n fetchedFailed,\r\n fetchingInBackground,\r\n} from 'store/global/fetch';\r\nimport { dispatchPassForScheduleReducer, updateDayData, updateBokaPassStatus } from '../pass';\r\nimport moment from 'moment';\r\nimport { getDateTextForView } from 'websd/utils';\r\nimport { updatePassDetailsData } from 'store/pass-details/read';\r\n\r\nexport const getBookingsInBackground = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (state.global.session.userId) {\r\n dispatch(fetchingInBackground(state.global.session.userId, FetchStatusAggregateTypes.BOKNING));\r\n }\r\n return dispatch(getBookings());\r\n};\r\n\r\nexport const getBookingsInForeground = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (state.global.session.userId) {\r\n dispatch(fetching(state.global.session.userId, FetchStatusAggregateTypes.BOKNING));\r\n }\r\n return dispatch(getBookings());\r\n};\r\n\r\nconst getBookings = (): ThunkAction => (dispatch: Dispatch, getState: () => RootState) => {\r\n const state = getState();\r\n const promise = api.get>('Bokning/MinaBokningar/', {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(populateBokningar(result.result));\r\n const days: Array> = SortIntoDays(result.result);\r\n const bokningarDaysInViewObject = SortSortedIntoDaysViewObject(days);\r\n dispatch(updateBokningarUI(bokningarDaysInViewObject));\r\n if (state.global.session.userId) {\r\n dispatch(fetched(state.global.session.userId, FetchStatusAggregateTypes.BOKNING, result));\r\n }\r\n } else {\r\n dispatch(updateBokningarUI({}));\r\n if (state.global.session.userId) {\r\n dispatch(fetchedFailed(state.global.session.userId, FetchStatusAggregateTypes.BOKNING));\r\n }\r\n }\r\n dispatch(getNextBokning());\r\n });\r\n return promise;\r\n};\r\n\r\nexport const deleteBokningFromStore =\r\n (id: string): ThunkAction =>\r\n (dispatch, getState) => {\r\n dispatch(deleteBokning(id));\r\n const days: Array> = SortIntoDays(getState().bokningar.bokningar);\r\n const bokningarDaysInViewObject = SortSortedIntoDaysViewObject(days);\r\n dispatch(updateBokningarUI(bokningarDaysInViewObject));\r\n dispatch(getNextBokning());\r\n };\r\n\r\nexport const avbokaPass =\r\n (payload: fos.api.CancelPayload, dayViewObjectKey: string): ThunkAction =>\r\n (dispatch, getState) => {\r\n const state = getState();\r\n const booking = state.bokningar.bokningar.find(b => b.BokningId === payload.bokningId) as fos.api.Bokning;\r\n return dispatch(scheduleAvbokaPass(payload, booking.PassId, dayViewObjectKey));\r\n };\r\n\r\nexport const scheduleAvbokaPass =\r\n (payload: fos.api.CancelPayload, passId: string, key: string) =>\r\n (dispatch: Dispatch, getState: () => RootState) => {\r\n dispatch(executingCommand(passId, FetchCommandTypes.AVBOKA_PASS));\r\n const promise = api.post('Bokning/AvbokaPass/', payload, {\r\n muteErrorNotificationOnStatus: [400],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n result.result.pass.statusMessage = getStatusMessage(result.result.status);\r\n const allDays = getState().pass.read.days;\r\n const dayKey = getDateTextForView(result.result.pass.StartTime);\r\n for (let i = 0; i < allDays.length; i++) {\r\n if (allDays[i].key === dayKey) {\r\n for (let j = 0; allDays[i].items.length; j++) {\r\n if (allDays[i].items[j].PassId === result.result.pass.PassId) {\r\n allDays[i].items[j] = result.result.pass;\r\n const detailedPass = getState().passDetails.read.pass;\r\n if (!!detailedPass && detailedPass.PassId === result.result.pass.PassId) {\r\n detailedPass.AntalLedigaPlatser = result.result.pass.AntalLedigaPlatser;\r\n detailedPass.AntalBokningsbaraPlatser = result.result.pass.AntalBokningsbaraPlatser;\r\n detailedPass.AntalDropinPlatser = result.result.pass.AntalDropinPlatser;\r\n detailedPass.AntalIVaenteLista = result.result.pass.AntalIVaenteLista;\r\n detailedPass.AntalPlatserTotal = result.result.pass.AntalPlatserTotal;\r\n detailedPass.AntalBokningsbaraPlatserTotalt = result.result.pass.AntalBokningsbaraPlatserTotalt;\r\n detailedPass.LedigaKoePlatser = result.result.pass.LedigaKoePlatser;\r\n detailedPass.BokningStatus = result.result.pass.BokningStatus;\r\n dispatch(updatePassDetailsData(detailedPass));\r\n }\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n dispatch(updateDayData(allDays));\r\n dispatchPassForScheduleReducer(allDays, dispatch);\r\n dispatch(deleteBokning(payload.bokningId));\r\n const days: Array> = SortIntoDays(getState().bokningar.bokningar);\r\n const bokningarDaysInViewObject = SortSortedIntoDaysViewObject(days);\r\n dispatch(updateBokaPassStatus(passId, getStatusMessage(result.result.status), key));\r\n dispatch(updateBokningarUI(bokningarDaysInViewObject));\r\n dispatch(getNextBokning());\r\n dispatch(executedCommand(passId, FetchCommandTypes.AVBOKA_PASS));\r\n } else {\r\n const statusMsg =\r\n result.result.http && result.result.http.response\r\n ? getStatusMessage(result.result.http.response.status)\r\n : SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR;\r\n dispatch(updateBokaPassStatus(passId, statusMsg, key));\r\n dispatch(updateStatusMessage(statusMsg, payload.bokningId));\r\n dispatchPassForScheduleReducer(getState().pass.read.days, dispatch);\r\n dispatch(executingCommandFailed(passId, FetchCommandTypes.AVBOKA_PASS));\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const getNextBokning = (): ThunkAction => (dispatch, getState) => {\r\n let nextBokning: fos.api.Bokning | undefined = undefined;\r\n let nextBokningStartDate: moment.Moment;\r\n getState().bokningar.bokningar.forEach(bokning => {\r\n if (bokning.readyToDelete) {\r\n return;\r\n }\r\n const bokningStartDate = moment(bokning.StartTime);\r\n const now = moment();\r\n if (!nextBokning) {\r\n if (bokningStartDate.isBefore(now)) {\r\n return;\r\n }\r\n nextBokning = bokning;\r\n nextBokningStartDate = bokningStartDate;\r\n } else {\r\n if (bokningStartDate.isBefore(nextBokningStartDate)) {\r\n nextBokning = bokning;\r\n nextBokningStartDate = bokningStartDate;\r\n }\r\n }\r\n });\r\n dispatch(setNextBokning(nextBokning));\r\n};\r\n","import { Query } from 'redux-first-router';\r\n\r\nexport enum LocationActionTypes {\r\n Home = 'LOCATION/HOME',\r\n PublicSchedule = 'LOCATION/PUBLIC/SCHEDULE',\r\n Login = 'LOCATION/LOGIN',\r\n AdminLogin = 'LOCATION/ADMIN',\r\n Reset = 'LOCATION/RESET',\r\n Settings = 'LOCATION/SETTINGS',\r\n Settings_Profile = 'LOCATION/SETTINGS/PROFILE',\r\n Settings_UserAccount = 'LOCATION/SETTINGS/USER_ACCOUNT',\r\n Settings_TrainingPreferences = 'LOCATION/SETTINGS/TRAININGPREFERENCES',\r\n Settings_PaymentSettings = 'LOCATION/SETTINGS/PAYMENT_SETTINGS',\r\n Settings_NotificationSettings = 'LOCATION/SETTINGS/NOTIFICATION_SETTINGS',\r\n Settings_CalendarSyncSettings = 'LOCATION/SETTINGS/CALENDARSYNC',\r\n Subscriptions = 'LOCATION/SUBSCRIPTIONS',\r\n Bookings = 'LOCATION/BOOKINGS',\r\n Rules = 'LOCATION/RULES',\r\n PassDetails = 'LOCATION/PASS_DETAILS',\r\n ShoppingBasket = 'LOCATIONS/SHOPPING_BASKET',\r\n PublicShoppingBasket = 'LOCATIONS/PUBLIC/SHOPPING_BASKET',\r\n AdminShoppingBasket = 'LOCATIONS/ADMIN/SHOPPING_BASKET',\r\n ProductDetails = 'LOCATION/PRODUCT_DETAILS',\r\n PublicProductDetails = 'LOCATION/PUBLIC/PRODUCT_DETAILS',\r\n AdminProductDetails = 'LOCATION/ADMIN/PRODUCT_DETAILS',\r\n Shop = 'LOCATIONS/SHOP',\r\n PublicShop = 'LOCATIONS/PUBLIC/SHOP',\r\n PublicRegister = 'LOCATIONS/PUBLIC/REGISTER',\r\n AdminShop = 'LOCATIONS/ADMIN/SHOP',\r\n AdminRegister = 'LOCATION/ADMIN/REGISTER',\r\n Facilities = 'LOCATIONS/FACILITIES',\r\n News = 'LOCATIONS/NEWS',\r\n Payment = 'LOCATIONS/PAYMENT',\r\n Notifications = 'LOCATIONS/NOTIFICATIONS',\r\n ResetPassword = 'LOCATIONS/ResetPassword',\r\n Statistics = 'LOCATIONS/STATISTICS',\r\n Schedule = 'LOCATION/SCHEDULE',\r\n Receipt = 'LOCATION/RECEIPT',\r\n}\r\n\r\ntype HomeRouteAction = {\r\n type: LocationActionTypes.Home;\r\n};\r\n\r\ntype PublicScheduleRouteAction = {\r\n type: LocationActionTypes.PublicSchedule;\r\n};\r\n\r\ntype LoginRouteAction = {\r\n type: LocationActionTypes.Login;\r\n};\r\n\r\ntype AdminLoginRouteAction = {\r\n type: LocationActionTypes.AdminLogin;\r\n};\r\n\r\ntype ResetRouteAction = {\r\n type: LocationActionTypes.Reset;\r\n};\r\n\r\ntype SettingsRouteAction = {\r\n type: LocationActionTypes.Settings;\r\n};\r\n\r\ntype PassDetailsRouteAction = {\r\n type: LocationActionTypes.PassDetails;\r\n payload: {\r\n passId: string;\r\n };\r\n};\r\n\r\ntype ProductDetailsRouteAction = {\r\n type: LocationActionTypes.ProductDetails;\r\n payload: {\r\n productId: number;\r\n productName: string;\r\n };\r\n query: {\r\n foerening: string;\r\n customerType: number;\r\n };\r\n};\r\n\r\ntype AdminProductDetailsRouteAction = {\r\n type: LocationActionTypes.AdminProductDetails;\r\n payload: {\r\n productId: number;\r\n productName: string;\r\n };\r\n query: {\r\n foerening: string;\r\n customerType: number;\r\n };\r\n};\r\n\r\ntype PublicProductDetailsRouteAction = {\r\n type: LocationActionTypes.PublicProductDetails;\r\n payload: {\r\n productId: number;\r\n productName: string;\r\n };\r\n query: {\r\n foerening: string;\r\n customerType: number;\r\n };\r\n};\r\n\r\ntype ProfileRouteAction = {\r\n type: LocationActionTypes.Settings_Profile;\r\n};\r\n\r\ntype RulesAction = {\r\n type: LocationActionTypes.Rules;\r\n};\r\n\r\ntype BookingsAction = {\r\n type: LocationActionTypes.Bookings;\r\n};\r\n\r\ntype NotificationsAction = {\r\n type: LocationActionTypes.Notifications;\r\n};\r\n\r\ntype StatisticsAction = {\r\n type: LocationActionTypes.Statistics;\r\n};\r\n\r\ntype PaymentAction = {\r\n type: LocationActionTypes.Payment;\r\n};\r\n\r\ntype UserAccountAction = {\r\n type: LocationActionTypes.Settings_UserAccount;\r\n};\r\n\r\ntype NotificationSettingsAction = {\r\n type: LocationActionTypes.Settings_NotificationSettings;\r\n};\r\n\r\ntype CalendarSyncAction = {\r\n type: LocationActionTypes.Settings_CalendarSyncSettings;\r\n};\r\n\r\nexport type ChangeLocationAction = {\r\n type: LocationActionTypes;\r\n query?: Query;\r\n payload?: Object;\r\n};\r\n\r\nexport enum LocationSwitchViewActionType {\r\n SwitchView = 'SWITCH_VIEW',\r\n}\r\n\r\ntype ResetPasswordRouteAction = {\r\n type: LocationActionTypes.ResetPassword;\r\n};\r\n\r\ntype ScheduleRouteAction = {\r\n type: LocationActionTypes.Schedule;\r\n};\r\n\r\ntype ReceiptRouteAction = {\r\n type: LocationActionTypes.Receipt;\r\n};\r\n\r\nexport const passDetailsRouteAction = (pass: fos.api.Pass | fos.api.Bokning): PassDetailsRouteAction => {\r\n return {\r\n type: LocationActionTypes.PassDetails,\r\n payload: {\r\n passId: pass.PassId,\r\n },\r\n };\r\n};\r\n\r\nexport const publicProductDetailsRouteAction = (\r\n id: number,\r\n name: string,\r\n foereningNamn: string,\r\n customerType: number\r\n): PublicProductDetailsRouteAction => {\r\n return {\r\n type: LocationActionTypes.PublicProductDetails,\r\n payload: {\r\n productId: id,\r\n productName: name,\r\n },\r\n query: {\r\n foerening: foereningNamn,\r\n customerType: customerType,\r\n },\r\n };\r\n};\r\n\r\nexport const productDetailsRouteAction = (\r\n id: number,\r\n name: string,\r\n foereningNamn: string,\r\n customerType: number\r\n): ProductDetailsRouteAction => {\r\n return {\r\n type: LocationActionTypes.ProductDetails,\r\n payload: {\r\n productId: id,\r\n productName: name,\r\n },\r\n query: {\r\n foerening: foereningNamn,\r\n customerType: customerType,\r\n },\r\n };\r\n};\r\n\r\nexport const adminProductDetailsRouteAction = (\r\n id: number,\r\n name: string,\r\n foereningNamn: string,\r\n customerType: number\r\n): AdminProductDetailsRouteAction => {\r\n return {\r\n type: LocationActionTypes.AdminProductDetails,\r\n payload: {\r\n productId: id,\r\n productName: name,\r\n },\r\n query: {\r\n foerening: foereningNamn,\r\n customerType: customerType,\r\n },\r\n };\r\n};\r\n\r\nexport const switchView = (\r\n destination?: LocationActionTypes,\r\n query?: Query,\r\n payload?: Object\r\n): ChangeLocationAction => ({\r\n type: destination || LocationActionTypes.Home,\r\n query,\r\n payload,\r\n});\r\n\r\nexport type LocationAction =\r\n | HomeRouteAction\r\n | PublicScheduleRouteAction\r\n | LoginRouteAction\r\n | AdminLoginRouteAction\r\n | ResetRouteAction\r\n | SettingsRouteAction\r\n | ProfileRouteAction\r\n | BookingsAction\r\n | PassDetailsRouteAction\r\n | ProductDetailsRouteAction\r\n | PublicProductDetailsRouteAction\r\n | RulesAction\r\n | PaymentAction\r\n | NotificationsAction\r\n | NotificationSettingsAction\r\n | CalendarSyncAction\r\n | UserAccountAction\r\n | StatisticsAction\r\n | ResetPasswordRouteAction\r\n | ScheduleRouteAction\r\n | ReceiptRouteAction\r\n | AdminProductDetailsRouteAction;\r\n","export enum SitecoreActionType {\r\n DisableBokaPass = 'DISABLE_BOKA_PASS',\r\n AllowBokaPass = 'ALLOW_BOKA_PASS',\r\n}\r\n\r\ninterface AllowBokaPassAction {\r\n type: SitecoreActionType.AllowBokaPass;\r\n}\r\n\r\ninterface DisableBokaPassAction {\r\n type: SitecoreActionType.DisableBokaPass;\r\n}\r\n\r\nexport const disableBokaPass = (): DisableBokaPassAction => ({\r\n type: SitecoreActionType.DisableBokaPass,\r\n});\r\n\r\nexport const allowBokaPass = (): AllowBokaPassAction => ({\r\n type: SitecoreActionType.AllowBokaPass,\r\n});\r\n\r\nexport type SitecoreAction = AllowBokaPassAction | DisableBokaPassAction;\r\n","import { RootState } from './../rootReducer';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Query, redirect } from 'redux-first-router';\r\nimport { ThunkAction } from 'store';\r\nimport { switchView, LocationActionTypes, Location, LocationState } from '.';\r\nimport { store } from 'index';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport const siteHasHistory = (locationState: LocationState) =>\r\n !!locationState.prev && !!locationState.prev.type && locationState.kind !== 'redirect';\r\n\r\nexport const goToSchedule = (): ThunkAction => dispatch => dispatch(switchView(LocationActionTypes.Schedule));\r\n\r\nexport const goToHome = (): ThunkAction => dispatch => dispatch(switchView(LocationActionTypes.Home));\r\n\r\nexport const goToLogin = (): ThunkAction => dispatch => dispatch(switchView(LocationActionTypes.Login));\r\n\r\nexport const goBack =\r\n (withRedirect?: boolean): ThunkAction =>\r\n (dispatch, getState) => {\r\n const state = getState();\r\n const route = siteHasHistory(state.location)\r\n ? state.location.prev.type\r\n : isInShop(state.location.type)\r\n ? getIsPublicWebMode(state.location)\r\n ? LocationActionTypes.PublicShop\r\n : getIsAdminWebMode(state.location)\r\n ? LocationActionTypes.AdminShop\r\n : LocationActionTypes.Shop\r\n : LocationActionTypes.Home;\r\n\r\n if (withRedirect) {\r\n dispatch(redirectTo(route, state.location.prev.query, state.location.prev.payload));\r\n } else {\r\n dispatch(switchView(route, state.location.prev.query, state.location.prev.payload));\r\n }\r\n };\r\n\r\nexport const redirectTo =\r\n (location: LocationActionTypes, query?: Query, payload?: Object): ThunkAction =>\r\n dispatch => {\r\n const s = switchView(location, query, payload);\r\n return dispatch(redirect(s));\r\n };\r\n\r\nconst isInShop = (type: LocationActionTypes): boolean => {\r\n return (\r\n type === LocationActionTypes.Shop ||\r\n type === LocationActionTypes.PublicShop ||\r\n type === LocationActionTypes.AdminShop ||\r\n type === LocationActionTypes.ShoppingBasket ||\r\n type === LocationActionTypes.PublicShoppingBasket ||\r\n type === LocationActionTypes.AdminShoppingBasket ||\r\n type === LocationActionTypes.ProductDetails ||\r\n type === LocationActionTypes.PublicProductDetails ||\r\n type === LocationActionTypes.AdminProductDetails ||\r\n type === LocationActionTypes.AdminRegister\r\n );\r\n};\r\n\r\ninterface ShowForLocation {\r\n location: LocationActionTypes;\r\n showOnDesktop?: boolean;\r\n hasTitle?: boolean;\r\n hasSubtitle?: boolean;\r\n}\r\n\r\nexport const getLocation = (state: LocationState) => state as Location;\r\n\r\nconst pagesWithTitleHeader: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.PublicShop,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n];\r\n\r\nconst publicWebPages: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.PublicSchedule,\r\n showOnDesktop: false,\r\n },\r\n {\r\n location: LocationActionTypes.PublicShoppingBasket,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.PublicProductDetails,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.PublicShop,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.PublicRegister,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.ResetPassword,\r\n showOnDesktop: true,\r\n },\r\n {\r\n location: LocationActionTypes.AdminLogin,\r\n showOnDesktop: true,\r\n },\r\n];\r\nconst adminWebPages: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.AdminShoppingBasket,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.AdminProductDetails,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.AdminShop,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.AdminRegister,\r\n showOnDesktop: true,\r\n hasTitle: true,\r\n hasSubtitle: true,\r\n },\r\n {\r\n location: LocationActionTypes.AdminLogin,\r\n showOnDesktop: true,\r\n },\r\n];\r\nconst noShowsForHeader: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.Payment,\r\n showOnDesktop: true,\r\n },\r\n {\r\n location: LocationActionTypes.ResetPassword,\r\n showOnDesktop: false,\r\n },\r\n];\r\n\r\nconst noShowsForFooter: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.PublicSchedule,\r\n showOnDesktop: false,\r\n },\r\n {\r\n location: LocationActionTypes.Schedule,\r\n showOnDesktop: true,\r\n },\r\n {\r\n location: LocationActionTypes.ShoppingBasket,\r\n showOnDesktop: false,\r\n },\r\n {\r\n location: LocationActionTypes.Payment,\r\n showOnDesktop: false,\r\n },\r\n {\r\n location: LocationActionTypes.ResetPassword,\r\n showOnDesktop: false,\r\n },\r\n];\r\n\r\nconst unauthorizedPages: ShowForLocation[] = [\r\n {\r\n location: LocationActionTypes.PublicShop,\r\n showOnDesktop: true,\r\n },\r\n];\r\n\r\nconst iframePages: ShowForLocation[] = [{ location: LocationActionTypes.PublicSchedule, showOnDesktop: false }];\r\nexport const getIsPublicWebMode = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return !shouldShow(locationState, publicWebPages, isDesktop);\r\n};\r\n\r\nexport const getIsAdminWebMode = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return !shouldShow(locationState, adminWebPages, isDesktop);\r\n};\r\n\r\nexport const getShowHeaderForLocation = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return shouldShow(locationState, noShowsForHeader, isDesktop);\r\n};\r\n\r\nexport const getShowFooterForLocation = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return shouldShow(locationState, noShowsForFooter, isDesktop);\r\n};\r\n\r\nexport const getIsUnauthorized = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return !shouldShow(locationState, unauthorizedPages, isDesktop);\r\n};\r\n\r\nexport const getIsIframeMode = (locationState: LocationState, isDesktop?: boolean): boolean => {\r\n return !shouldShow(locationState, iframePages, isDesktop);\r\n};\r\n\r\nexport const getPageTitle = (\r\n location: Location,\r\n isDesktopMode: boolean,\r\n translate: TranslateFunction\r\n): string | null => {\r\n // const state: RootState = store.getState();\r\n let pageTitle = null;\r\n\r\n switch (location.type) {\r\n case LocationActionTypes.Home:\r\n return translate(SitecoreDictionary.StartPage.Greetings) as string;\r\n case LocationActionTypes.Settings:\r\n return translate(SitecoreDictionary.PageTitles.ProfileAndSettings) as string;\r\n case LocationActionTypes.Settings_Profile:\r\n return isDesktopMode\r\n ? (translate(SitecoreDictionary.PageTitles.ProfileAndSettings) as string)\r\n : (translate(SitecoreDictionary.PageTitles.Profile) as string);\r\n case LocationActionTypes.Settings_UserAccount:\r\n return isDesktopMode\r\n ? (translate(SitecoreDictionary.PageTitles.ProfileAndSettings) as string)\r\n : (translate(SitecoreDictionary.PageTitles.Account) as string);\r\n case LocationActionTypes.Settings_TrainingPreferences:\r\n return translate(SitecoreDictionary.PageTitles.TrainingsPreferences) as string;\r\n case LocationActionTypes.Settings_PaymentSettings:\r\n return isDesktopMode\r\n ? (translate(SitecoreDictionary.PageTitles.ProfileAndSettings) as string)\r\n : (translate(SitecoreDictionary.PageTitles.PaymentMethods) as string);\r\n case LocationActionTypes.Settings_NotificationSettings:\r\n return isDesktopMode\r\n ? (translate(SitecoreDictionary.PageTitles.ProfileAndSettings) as string)\r\n : (translate(SitecoreDictionary.PageTitles.PushNotifications) as string);\r\n case LocationActionTypes.Settings_CalendarSyncSettings:\r\n return isDesktopMode\r\n ? (translate(SitecoreDictionary.Profile.Menu.CalendarSyncTitle) as string)\r\n : (translate(SitecoreDictionary.Profile.Menu.CalendarSyncTitle) as string);\r\n case LocationActionTypes.Subscriptions:\r\n return translate(SitecoreDictionary.PageTitles.MembershipAndCards) as string;\r\n case LocationActionTypes.ShoppingBasket:\r\n return translate(SitecoreDictionary.PageTitles.ShoppingBasket) as string;\r\n case LocationActionTypes.PublicShoppingBasket:\r\n return translate(SitecoreDictionary.PageTitles.ShoppingBasket) as string;\r\n case LocationActionTypes.AdminShoppingBasket:\r\n return translate(SitecoreDictionary.PageTitles.ShoppingBasket) as string;\r\n case LocationActionTypes.AdminRegister:\r\n return translate(SitecoreDictionary.PageTitles.ShoppingBasket) as string;\r\n case LocationActionTypes.Facilities:\r\n return translate(SitecoreDictionary.PageTitles.Facilities) as string;\r\n case LocationActionTypes.News:\r\n return translate(SitecoreDictionary.PageTitles.News) as string;\r\n case LocationActionTypes.Payment:\r\n return translate(SitecoreDictionary.PageTitles.Payment) as string;\r\n case LocationActionTypes.PassDetails:\r\n return '';\r\n case LocationActionTypes.Login:\r\n return pageTitle;\r\n case LocationActionTypes.AdminLogin:\r\n return pageTitle;\r\n case LocationActionTypes.Reset:\r\n return pageTitle;\r\n case LocationActionTypes.ResetPassword:\r\n return pageTitle;\r\n case LocationActionTypes.Shop:\r\n return translate(SitecoreDictionary.PageTitles.Shop) as string;\r\n case LocationActionTypes.PublicShop:\r\n return translate(SitecoreDictionary.PageTitles.Shop) as string;\r\n case LocationActionTypes.AdminShop:\r\n return translate(SitecoreDictionary.PageTitles.Shop) as string;\r\n case LocationActionTypes.ProductDetails:\r\n return location.payload.productName;\r\n case LocationActionTypes.PublicProductDetails:\r\n return location.payload.productName;\r\n case LocationActionTypes.AdminProductDetails:\r\n return location.payload.productName;\r\n case LocationActionTypes.Bookings:\r\n return translate(SitecoreDictionary.PageTitles.Bookings) as string;\r\n case LocationActionTypes.Notifications:\r\n return translate(SitecoreDictionary.PageTitles.Notifications) as string;\r\n case LocationActionTypes.Statistics:\r\n return translate(SitecoreDictionary.PageTitles.Statistics) as string;\r\n case LocationActionTypes.Schedule:\r\n return translate(SitecoreDictionary.PageTitles.Schedule) as string;\r\n case LocationActionTypes.Receipt:\r\n return translate(SitecoreDictionary.PageTitles.Receipt) as string;\r\n default:\r\n return pageTitle;\r\n }\r\n};\r\n\r\nexport const hasHeaderTitle = (location: Location): boolean => {\r\n const currentLocation = location.type;\r\n const page = pagesWithTitleHeader.find(p => p.location === currentLocation);\r\n return !!page && !!page.hasTitle;\r\n};\r\n\r\nexport const hasHeaderSubtitle = (location: Location): boolean => {\r\n const currentLocation = location.type;\r\n const page = pagesWithTitleHeader.find(p => p.location === currentLocation);\r\n return !!page && !!page.hasSubtitle;\r\n};\r\n\r\nexport const getHeaderSubtitleForCurrentLocation = () => {\r\n const state: RootState = store.getState();\r\n const location: Location = state.location;\r\n switch (location.type) {\r\n case LocationActionTypes.PublicShop:\r\n return getCurrentFoereningName();\r\n default:\r\n return;\r\n }\r\n};\r\n\r\nconst shouldShow = (locationState: LocationState, noShows: ShowForLocation[], isDesktop?: boolean): boolean => {\r\n const currentLocation = locationState.type;\r\n const addressInNoShowsList = noShows.find(noShow => noShow.location === currentLocation);\r\n return (\r\n !addressInNoShowsList || ((addressInNoShowsList && addressInNoShowsList.showOnDesktop && isDesktop) as boolean)\r\n ); // Show only on desktop\r\n};\r\n\r\nconst getCurrentFoereningName = () => {\r\n const state: RootState = store.getState();\r\n const activeFoerening = state.global.session.activeFoerening;\r\n if (!activeFoerening) {\r\n return;\r\n }\r\n const inloggadeFoereningar = state.global.session.inloggadeFoereningar;\r\n if (!inloggadeFoereningar || inloggadeFoereningar.length < 1) {\r\n return;\r\n }\r\n\r\n const foerening = inloggadeFoereningar.find(f => f.Id.toString() === activeFoerening.toString());\r\n if (!foerening) {\r\n return;\r\n }\r\n\r\n const fullFoerening = state.foereningar.read.Foereningar.find(f => f.Id.toString() === activeFoerening.toString());\r\n\r\n return !!fullFoerening ? fullFoerening.DisplayName : !!foerening.DisplayName ? foerening.DisplayName : foerening.Namn;\r\n};\r\n","import { LocationActionTypes } from './locationActions';\r\n\r\nexport const routesMap = {\r\n [LocationActionTypes.Home]: '/',\r\n [LocationActionTypes.PublicSchedule]: '/public/schedule',\r\n [LocationActionTypes.Schedule]: '/schedule',\r\n [LocationActionTypes.Login]: '/login',\r\n [LocationActionTypes.AdminLogin]: '/admin',\r\n [LocationActionTypes.Reset]: '/reset',\r\n [LocationActionTypes.Settings]: '/settings',\r\n [LocationActionTypes.PassDetails]: '/pass/:passId',\r\n [LocationActionTypes.Settings_Profile]: '/settings/profile',\r\n [LocationActionTypes.Settings_UserAccount]: '/settings/account',\r\n [LocationActionTypes.Settings_TrainingPreferences]: '/settings/preferences',\r\n [LocationActionTypes.Settings_PaymentSettings]: '/settings/paymentSettings',\r\n [LocationActionTypes.Settings_NotificationSettings]: '/settings/notification-settings',\r\n [LocationActionTypes.Settings_CalendarSyncSettings]: '/settings/calendarsync',\r\n [LocationActionTypes.Subscriptions]: '/subscriptions',\r\n [LocationActionTypes.Bookings]: '/bookings',\r\n [LocationActionTypes.Notifications]: '/notifications',\r\n [LocationActionTypes.Statistics]: '/statistics',\r\n [LocationActionTypes.Rules]: '/rules',\r\n [LocationActionTypes.ShoppingBasket]: '/ShoppingBasket',\r\n [LocationActionTypes.PublicShoppingBasket]: '/public/ShoppingBasket',\r\n [LocationActionTypes.Facilities]: '/anlaggningar',\r\n [LocationActionTypes.News]: '/nyheter',\r\n [LocationActionTypes.Payment]: '/payment',\r\n [LocationActionTypes.Shop]: '/shop',\r\n [LocationActionTypes.ProductDetails]: '/shop/product/:productId',\r\n [LocationActionTypes.PublicProductDetails]: '/public/shop/product/:productId',\r\n [LocationActionTypes.PublicShop]: '/public/shop',\r\n [LocationActionTypes.PublicRegister]: '/public/register',\r\n [LocationActionTypes.AdminShoppingBasket]: '/admin/ShoppingBasket',\r\n [LocationActionTypes.AdminProductDetails]: '/admin/shop/product/:productId',\r\n [LocationActionTypes.AdminShop]: '/admin/shop',\r\n [LocationActionTypes.AdminRegister]: '/admin/register',\r\n [LocationActionTypes.ResetPassword]: '/resetPassword',\r\n [LocationActionTypes.Statistics]: '/statistics',\r\n [LocationActionTypes.Receipt]: '/receipt',\r\n};\r\n","export interface CalendarState {\r\n syncIsActive: boolean;\r\n shouldShowCalendarSyncPopup: boolean;\r\n selectedCalendar?: string;\r\n}\r\n\r\nexport enum CalendarActionTypes {\r\n SetCalendarSync = 'session/TOGGLE_CALENDARSYNC_VALUE',\r\n SetSelectedCalendar = 'session/SET_SELECTED_CALENDAR',\r\n SetShouldShowCalendarSyncPopup = 'session/SET_SHOULD_SHOW_CALENDAR_SYNC_POPUP',\r\n}\r\nexport interface SetCalendarSyncAction {\r\n type: CalendarActionTypes.SetCalendarSync;\r\n syncCalendar: boolean;\r\n}\r\nexport interface SetSelectedCalendarAction {\r\n type: CalendarActionTypes.SetSelectedCalendar;\r\n id?: string;\r\n}\r\nexport interface SetShouldShowCalendarSyncPopupAction {\r\n type: CalendarActionTypes.SetShouldShowCalendarSyncPopup;\r\n show: boolean;\r\n}\r\n","import { SetCalendarSyncAction } from '.';\r\nimport { CalendarActionTypes, SetSelectedCalendarAction, SetShouldShowCalendarSyncPopupAction } from './calendarModels';\r\n\r\nexport const toggleSyncCalendar = (syncCalendar: boolean): SetCalendarSyncAction => ({\r\n type: CalendarActionTypes.SetCalendarSync,\r\n syncCalendar,\r\n});\r\n\r\nexport const setSelectedCalendarId = (id?: string): SetSelectedCalendarAction => ({\r\n type: CalendarActionTypes.SetSelectedCalendar,\r\n id,\r\n});\r\n\r\nexport const setShouldShowCalendarSyncPopup = (show: boolean): SetShouldShowCalendarSyncPopupAction => ({\r\n type: CalendarActionTypes.SetShouldShowCalendarSyncPopup,\r\n show,\r\n});\r\n\r\nexport type CalendarActions = SetCalendarSyncAction | SetSelectedCalendarAction | SetShouldShowCalendarSyncPopupAction;\r\n","export enum DictionaryStatus {\r\n INITIAL,\r\n LOADING,\r\n READY,\r\n}\r\n\r\nexport interface DictionaryRootState {\r\n status: DictionaryStatus;\r\n}\r\n","import {\r\n InitializeAction,\r\n AddTranslationAction,\r\n AddTranslationForLanguageAction,\r\n SetActiveLanguageAction,\r\n SetLanguagesAction,\r\n} from 'react-localize-redux';\r\nimport { DictionaryStatus } from '.';\r\n\r\nexport enum ActionType {\r\n SetTranslations = 'SET_TRANSLATIONS',\r\n}\r\n\r\nexport type LocaleAction =\r\n | InitializeAction\r\n | AddTranslationAction\r\n | AddTranslationForLanguageAction\r\n | SetActiveLanguageAction\r\n | SetLanguagesAction;\r\n\r\nexport interface TranslateAction {\r\n type: ActionType.SetTranslations;\r\n translations: {};\r\n}\r\n\r\nexport enum DictionaryActionTypes {\r\n UPDATE_STATUS = 'DICTIONARY/UPDATE_STATUS',\r\n}\r\n\r\nexport interface UpdateDictionaryStatusAction {\r\n type: DictionaryActionTypes.UPDATE_STATUS;\r\n status: DictionaryStatus;\r\n}\r\n\r\nexport const updateDictionaryStatus = (status: DictionaryStatus): UpdateDictionaryStatusAction => ({\r\n type: DictionaryActionTypes.UPDATE_STATUS,\r\n status,\r\n});\r\n\r\nexport type DictionaryActions = UpdateDictionaryStatusAction;\r\n","import { Reducer } from 'redux';\r\nimport { CalendarActionTypes, CalendarState, CalendarActions } from '.';\r\n\r\nconst initialState: CalendarState = {\r\n syncIsActive: false,\r\n shouldShowCalendarSyncPopup: true,\r\n};\r\n\r\nexport const calendarReducer: Reducer = (state = initialState, action: CalendarActions) => {\r\n switch (action.type) {\r\n case CalendarActionTypes.SetCalendarSync:\r\n return {\r\n ...state,\r\n syncIsActive: action.syncCalendar,\r\n };\r\n case CalendarActionTypes.SetSelectedCalendar:\r\n return {\r\n ...state,\r\n selectedCalendar: action.id,\r\n };\r\n case CalendarActionTypes.SetShouldShowCalendarSyncPopup:\r\n return {\r\n ...state,\r\n shouldShowCalendarSyncPopup: action.show,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { api } from 'api';\r\nimport { ThunkAction } from 'store';\r\nimport { toggleSyncCalendar, setSelectedCalendarId } from './calendarActions';\r\nimport {\r\n executingCommand,\r\n FetchCommandTypes,\r\n executingCommandFailed,\r\n executedCommand,\r\n fetching,\r\n FetchStatusAggregateTypes,\r\n fetched,\r\n fetchedFailed,\r\n} from '../fetch';\r\n\r\ninterface CalendarProps {\r\n userId: number;\r\n syncCalendar: boolean;\r\n}\r\ninterface SelectedCalendarProps {\r\n userId: number;\r\n id: string;\r\n}\r\ninterface GetCalendarProps {\r\n syncCalendar: boolean;\r\n id: string;\r\n}\r\n\r\nexport const setCalendarSync = (userId: number, syncCalendar: boolean): ThunkAction => (dispatch, getState) => {\r\n dispatch(executingCommand(userId.toString(), FetchCommandTypes.SET_CALENDAR_SYNC));\r\n dispatch(toggleSyncCalendar(syncCalendar));\r\n const response = api.post('Anvaendare/SyncCalendar', {\r\n userId: userId,\r\n syncCalendar: syncCalendar,\r\n });\r\n response.then(result => {\r\n if (result.error) {\r\n dispatch(executingCommandFailed(userId.toString(), FetchCommandTypes.SET_CALENDAR_SYNC));\r\n dispatch(toggleSyncCalendar(!syncCalendar));\r\n } else {\r\n dispatch(executedCommand(userId.toString(), FetchCommandTypes.SET_CALENDAR_SYNC));\r\n }\r\n });\r\n};\r\n\r\nexport const setSelectedCalendar = (userId: number, id: string): ThunkAction => (dispatch, getState) => {\r\n dispatch(executingCommand(userId.toString(), FetchCommandTypes.SET_SELECTED_CALENDAR));\r\n dispatch(setSelectedCalendarId(id));\r\n const response = api.post('Anvaendare/SetSelectedCalendar', {\r\n userId: userId,\r\n id: id,\r\n });\r\n response.then(result => {\r\n if (result.error) {\r\n dispatch(executingCommandFailed(userId.toString(), FetchCommandTypes.SET_SELECTED_CALENDAR));\r\n dispatch(setSelectedCalendarId(undefined));\r\n } else {\r\n dispatch(executedCommand(userId.toString(), FetchCommandTypes.SET_SELECTED_CALENDAR));\r\n }\r\n });\r\n};\r\n\r\nexport const getCalendarSync = (userId: number): ThunkAction => (dispatch, getState) => {\r\n dispatch(fetching(userId, FetchStatusAggregateTypes.GET_CALENDAR));\r\n const response = api.get('Anvaendare/GetCalendarSync?userId=' + userId);\r\n response.then(result => {\r\n if (!result.error) {\r\n dispatch(toggleSyncCalendar(result.result.syncCalendar));\r\n dispatch(setSelectedCalendarId(result.result.id));\r\n dispatch(fetched(userId, FetchStatusAggregateTypes.GET_CALENDAR, result.result));\r\n } else {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.GET_CALENDAR));\r\n }\r\n });\r\n};\r\n","import { initialize, addTranslation } from 'react-localize-redux';\r\nimport { ThunkAction } from 'store/rootReducer';\r\nimport { api } from 'api';\r\nimport { RootState } from 'store';\r\nimport { localStorage } from 'utils/localStorage';\r\nimport { updateDictionaryStatus, DictionaryStatus } from '.';\r\n\r\nconst LOCALSTORAGE_DICTIONARY_KEY = 'dict';\r\n\r\nexport interface DictionaryData {\r\n Languages: Array;\r\n Translations: {};\r\n}\r\n\r\nconst setupDictionary = (dictionary: DictionaryData, defaultLanguage: string): ThunkAction => dispatch => {\r\n localStorage.saveItem(LOCALSTORAGE_DICTIONARY_KEY, dictionary, undefined, true);\r\n dispatch(initialize(dictionary.Languages, { defaultLanguage }));\r\n dispatch(addTranslation(dictionary.Translations));\r\n dispatch(updateDictionaryStatus(DictionaryStatus.READY));\r\n};\r\n\r\nexport const getTranslationData = (): ThunkAction => (dispatch, getState) => {\r\n dispatch(updateDictionaryStatus(DictionaryStatus.LOADING));\r\n const localDict = localStorage.getItem(LOCALSTORAGE_DICTIONARY_KEY);\r\n if (localDict && localDict.value) {\r\n dispatch(setupDictionary(localDict.value, getDefaultLanguage(getState())));\r\n }\r\n api.get('Dictionary/GetDictionary', { anonymousCall: true }).then(res => {\r\n if (!res.error) {\r\n let defaultLanguage = getDefaultLanguage(getState());\r\n let dictionary = res.result as DictionaryData;\r\n dispatch(setupDictionary(dictionary, defaultLanguage));\r\n }\r\n });\r\n};\r\n\r\nfunction getDefaultLanguage(state: RootState) {\r\n if (state.global.ui.language && state.global.ui.language.code) {\r\n return state.global.ui.language.code;\r\n } else {\r\n // TODO: ouyo hitta på ett bättre sätt för default språk\r\n return 'sv';\r\n }\r\n}\r\n","import { DictionaryActionTypes } from './dictionaryActions';\r\nimport { Action } from 'store';\r\nimport { Reducer } from 'redux';\r\nimport { DictionaryRootState, DictionaryStatus } from '.';\r\n\r\nconst initialStatus: DictionaryRootState = {\r\n status: DictionaryStatus.INITIAL,\r\n};\r\n\r\nexport const DictionaryReducer: Reducer = (\r\n state: DictionaryRootState = initialStatus,\r\n action: Action\r\n) => {\r\n switch (action.type) {\r\n case DictionaryActionTypes.UPDATE_STATUS:\r\n return {\r\n ...state,\r\n status: action.status,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { PassFilterKategorier, PassFilterFavoritfilter, PassFilterFiltrerbaraKategorier } from '.';\r\nimport { DayViewObject } from 'models/Day';\r\nimport { PassFilterFilterCache } from './passFilterModels';\r\n\r\nexport enum PassFilterActionType {\r\n PassFilterSetKategoriVald = 'PASS_FILTER_SET_KATEGORI_VALD',\r\n PassFilterSetFilterValt = 'PASS_FILTER_SET_FILTER_VALT',\r\n PassFilterSetAllaIFiltergruppVald = 'PASS_FILTER_SET_ALLA_I_FILTERGRUPP_VALD',\r\n PassFilterSetFilterIGruppVald = 'PASS_FILTER_SET_FILTER_I_GRUPP_VALD',\r\n PassFilterSetFiltergruppOeppnad = 'PASS_FILTER_SET_FILTERGRUPP_OEPPNAD',\r\n PassFilterSetFavoritfilterValt = 'PASS_FILTER_SET_FAVORITFILTER_VALT',\r\n PassFilterCreateFavoritfilter = 'PASS_FILTER_CREATE_FAVORITFILTER',\r\n PassFilterDeleteFavoritfilter = 'PASS_FILTER_DELETE_FAVORITFILTER',\r\n PassFilterRensaFilter = 'PASS_FILTER_RENSA_FILTER',\r\n PassFilterVisaFilter = 'PASS_FILTER_VISA_FILTER',\r\n PassFilterSetFilter = 'PASS_FILTER_SET_FILTER',\r\n PassFilterUpdateUnfilteredDays = 'PASS_FILTER_UPDATE_UNFILTERED_DAYS',\r\n PassFilterSetFavoritfilter = 'PASS_FILTER_SET_FAVORITFILTER',\r\n PassFilterSetFilterFraanCache = 'PASS_FILTER_SET_FILTER_FRAAN_CACHE',\r\n PassFilterSetFritextTerm = 'PASS_FILTER_SET_FRITEXT_TERM',\r\n}\r\n\r\nexport interface PassFilterActionSetKategoriVald {\r\n type: PassFilterActionType.PassFilterSetKategoriVald;\r\n kategori: keyof typeof PassFilterKategorier;\r\n vald: boolean;\r\n}\r\nexport interface PassFilterActionSetFilterValt {\r\n type: PassFilterActionType.PassFilterSetFilterValt;\r\n kategori: keyof typeof PassFilterKategorier;\r\n namn: string;\r\n vald: boolean;\r\n}\r\nexport interface PassFilterActionSetAllaIFiltergruppVald {\r\n type: PassFilterActionType.PassFilterSetAllaIFiltergruppVald;\r\n kategori: keyof typeof PassFilterKategorier;\r\n filtergruppNamn: string;\r\n vald: boolean;\r\n}\r\nexport interface PassFilterActionSetFilterIGruppVald {\r\n type: PassFilterActionType.PassFilterSetFilterIGruppVald;\r\n kategori: keyof typeof PassFilterKategorier;\r\n filtergruppNamn: string;\r\n filter: string;\r\n vald: boolean;\r\n}\r\nexport interface PassFilterActionSetFiltergruppOeppnad {\r\n type: PassFilterActionType.PassFilterSetFiltergruppOeppnad;\r\n kategori: keyof typeof PassFilterKategorier;\r\n filtergruppNamn: string;\r\n oeppnad: boolean;\r\n}\r\nexport interface PassFilterActionSetFavoritfilterValt {\r\n type: PassFilterActionType.PassFilterSetFavoritfilterValt;\r\n favoritFilterId: number;\r\n}\r\nexport interface PassFilterActionCreateFavoritfilter {\r\n type: PassFilterActionType.PassFilterCreateFavoritfilter;\r\n filter: PassFilterFavoritfilter;\r\n}\r\nexport interface PassFilterActionDeleteFavoritfilter {\r\n type: PassFilterActionType.PassFilterDeleteFavoritfilter;\r\n filterId: number;\r\n}\r\nexport interface PassFilterRensaFilter {\r\n type: PassFilterActionType.PassFilterRensaFilter;\r\n}\r\nexport interface PassFilterVisaFilter {\r\n type: PassFilterActionType.PassFilterVisaFilter;\r\n visa: boolean;\r\n}\r\nexport interface PassFilterSetFilter {\r\n type: PassFilterActionType.PassFilterSetFilter;\r\n filter: PassFilterFiltrerbaraKategorier;\r\n}\r\nexport interface PassFilterUpdateUnfilteredDays {\r\n type: PassFilterActionType.PassFilterUpdateUnfilteredDays;\r\n unfilteredDays: DayViewObject;\r\n}\r\nexport interface PassFilterActionSetFavoritfilter {\r\n type: PassFilterActionType.PassFilterSetFavoritfilter;\r\n favoritfilter: PassFilterFavoritfilter[];\r\n}\r\nexport interface PassFilterActionSetFilterFraanCache {\r\n type: PassFilterActionType.PassFilterSetFilterFraanCache;\r\n cache: PassFilterFilterCache;\r\n}\r\nexport interface PassFilterActionSetFritextTerm {\r\n type: PassFilterActionType.PassFilterSetFritextTerm;\r\n term: string;\r\n}\r\nexport type PassFilterAction =\r\n | PassFilterActionSetKategoriVald\r\n | PassFilterActionSetFilterValt\r\n | PassFilterActionSetAllaIFiltergruppVald\r\n | PassFilterActionSetFilterIGruppVald\r\n | PassFilterActionSetFiltergruppOeppnad\r\n | PassFilterActionSetFavoritfilterValt\r\n | PassFilterActionCreateFavoritfilter\r\n | PassFilterActionDeleteFavoritfilter\r\n | PassFilterRensaFilter\r\n | PassFilterVisaFilter\r\n | PassFilterSetFilter\r\n | PassFilterUpdateUnfilteredDays\r\n | PassFilterActionSetFavoritfilter\r\n | PassFilterActionSetFritextTerm\r\n | PassFilterActionSetFilterFraanCache;\r\n","import { PassFilterActionType, PassFilterAction } from './passFilterActions';\r\nimport {\r\n PassFilterFiltrerbarKategori,\r\n PassFilterFilterval,\r\n PassFilterFiltervalGrupp,\r\n PassFilterKategorier,\r\n PassFilterFavoritfilter,\r\n PassFilterFiltrerbaraKategorier,\r\n PassFilterFlatKategorier,\r\n} from '.';\r\nimport { DayViewObject } from 'models/Day';\r\n\r\nexport interface PassFilterRootState {\r\n filter: PassFilterFiltrerbaraKategorier;\r\n oeppenKategori?: keyof typeof PassFilterKategorier;\r\n favoritFilter: PassFilterFavoritfilter[];\r\n valtFavoritFilterId?: number;\r\n filterSynligt: boolean;\r\n filteredPassIds: { day: string; passIds: string[] }[];\r\n unfilteredDays: DayViewObject;\r\n flatFilter: PassFilterFlatKategorier;\r\n fritextTerm: string;\r\n}\r\n\r\nconst initialState: PassFilterRootState = {\r\n filter: {\r\n Traeningsstaelle: {\r\n vaerden: [],\r\n soekbar: true,\r\n anvaendTranslate: false,\r\n },\r\n Traeningspass: {\r\n vaerden: [],\r\n soekbar: true,\r\n anvaendTranslate: false,\r\n },\r\n Tidpunkt: {\r\n vaerden: [],\r\n soekbar: false,\r\n anvaendTranslate: true,\r\n },\r\n LedareOrTraenare: {\r\n vaerden: [],\r\n soekbar: false,\r\n anvaendTranslate: false,\r\n },\r\n Veckodag: {\r\n vaerden: [],\r\n soekbar: false,\r\n anvaendTranslate: true,\r\n },\r\n },\r\n favoritFilter: [],\r\n filterSynligt: false,\r\n filteredPassIds: [],\r\n unfilteredDays: {},\r\n flatFilter: {\r\n Traeningsstaelle: [],\r\n LedareOrTraenare: [],\r\n Traeningspass: [],\r\n Veckodag: [],\r\n Tidpunkt: [],\r\n },\r\n fritextTerm: '',\r\n};\r\n\r\nexport const isFiltervalGrupp = (\r\n filterval: PassFilterFilterval | PassFilterFiltervalGrupp\r\n): filterval is PassFilterFiltervalGrupp => {\r\n return filterval['filterval'] !== undefined;\r\n};\r\n\r\nconst getFilteredPass = (\r\n pass: fos.api.Pass[],\r\n dagIVeckan: string,\r\n filter: PassFilterFlatKategorier,\r\n fritextFilter: string[]\r\n): fos.api.Pass[] => {\r\n if (\r\n filter.Traeningsstaelle.length === 0 &&\r\n filter.Traeningspass.length === 0 &&\r\n filter.Tidpunkt.length === 0 &&\r\n filter.Veckodag.length === 0 &&\r\n filter.LedareOrTraenare.length === 0 &&\r\n fritextFilter.length === 0\r\n ) {\r\n return pass;\r\n }\r\n const fi = pass.filter(p => {\r\n const anlaeggningsNamn = p.AnlaeggningsNamn.toLocaleLowerCase();\r\n const traeningspass = p.PassNamn.toLocaleLowerCase();\r\n const tidpunkt = p.PeriodOfTheDay.toLocaleLowerCase();\r\n const veckodag = dagIVeckan.toLocaleLowerCase();\r\n if (\r\n (filter.Traeningsstaelle.length === 0 || filter.Traeningsstaelle.some(t => t === anlaeggningsNamn)) &&\r\n (filter.Traeningspass.length === 0 || filter.Traeningspass.some(t => t === traeningspass)) &&\r\n (filter.Tidpunkt.length === 0 || filter.Tidpunkt.some(t => t === tidpunkt)) &&\r\n (filter.Veckodag.length === 0 || filter.Veckodag.some(v => v === veckodag)) &&\r\n (filter.LedareOrTraenare.length === 0 ||\r\n filter.LedareOrTraenare.some(t => p.Instruktoerer.some(i => i.toLocaleLowerCase() === t)))\r\n ) {\r\n if (fritextFilter.length === 0) {\r\n return true;\r\n }\r\n const r = fritextFilter.map(f => {\r\n return (\r\n anlaeggningsNamn.indexOf(f) !== -1 ||\r\n traeningspass.indexOf(f) !== -1 ||\r\n tidpunkt.indexOf(f) !== -1 ||\r\n veckodag.indexOf(f) !== -1 ||\r\n p.Instruktoerer.some(i => i.toLocaleLowerCase().indexOf(f) !== -1)\r\n );\r\n });\r\n return !r.some(r => !r);\r\n }\r\n return false;\r\n });\r\n return fi;\r\n};\r\n\r\nconst getFilteredPassIdByDay = (\r\n unfilteredDays: DayViewObject,\r\n flatFilter: PassFilterFlatKategorier,\r\n fritextTerm: string\r\n): { day: string; passIds: string[] }[] => {\r\n if (!unfilteredDays) {\r\n return [];\r\n }\r\n const fritextFilter = fritextTerm\r\n .replace(/[,.]/g, ' ')\r\n .split(' ')\r\n .filter(l => !!l);\r\n const dayKeys = Object.keys(unfilteredDays);\r\n const val = dayKeys.map(d => {\r\n const filtered = getFilteredPass(\r\n unfilteredDays[d].items,\r\n unfilteredDays[d].key.substring(0, unfilteredDays[d].key.indexOf(',')),\r\n flatFilter,\r\n fritextFilter\r\n );\r\n return { day: d, passIds: filtered.map(p => p.PassId) };\r\n });\r\n return val;\r\n};\r\n\r\nconst appliceraFilterPaaKategori = (filterKategori: PassFilterFiltrerbarKategori, filter: string[]) => {\r\n if (filterKategori) {\r\n filterKategori.vaerden.forEach(tp => {\r\n if (isFiltervalGrupp(tp)) {\r\n tp.filterval.forEach(fv => {\r\n fv.vald = filter.indexOf(fv.vaerde) !== -1;\r\n });\r\n } else {\r\n tp.vald = filter.indexOf(tp.vaerde) !== -1;\r\n }\r\n });\r\n }\r\n};\r\n\r\nconst uppdateraInkommandeFilterMedNuvarandeVal = (\r\n inkommandeFilter: PassFilterFiltrerbarKategori,\r\n nuvarandeFilter: PassFilterFiltrerbarKategori\r\n) => {\r\n inkommandeFilter.vaerden.forEach((v, i) => {\r\n const nuvarande = nuvarandeFilter.vaerden.find(nv => nv.namn === v.namn);\r\n if (nuvarande) {\r\n if (isFiltervalGrupp(v)) {\r\n if (isFiltervalGrupp(nuvarande)) {\r\n v.oeppen = nuvarande.oeppen;\r\n v.filterval.forEach(fv => {\r\n const nuvarandeFilterval = nuvarande.filterval.find(nfv => nfv.namn === fv.namn);\r\n fv.vald = !!nuvarandeFilterval && nuvarandeFilterval.vald;\r\n });\r\n }\r\n } else {\r\n if (!isFiltervalGrupp(nuvarande)) {\r\n v.vald = nuvarande.vald;\r\n }\r\n }\r\n }\r\n });\r\n};\r\n\r\nexport const passFilterReducer = (\r\n state: PassFilterRootState = initialState,\r\n action: PassFilterAction\r\n): PassFilterRootState => {\r\n switch (action.type) {\r\n case PassFilterActionType.PassFilterSetFritextTerm: {\r\n const fritext = action.term.toLocaleLowerCase();\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, state.flatFilter, fritext);\r\n return {\r\n ...state,\r\n filteredPassIds: filteredPassIds,\r\n fritextTerm: fritext,\r\n };\r\n }\r\n\r\n case PassFilterActionType.PassFilterUpdateUnfilteredDays: {\r\n const unfilteredDays = action.unfilteredDays;\r\n const filteredPassIds = getFilteredPassIdByDay(unfilteredDays, state.flatFilter, state.fritextTerm);\r\n return {\r\n ...state,\r\n unfilteredDays: unfilteredDays,\r\n filteredPassIds: filteredPassIds,\r\n };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetFilter: {\r\n uppdateraInkommandeFilterMedNuvarandeVal(action.filter.Traeningsstaelle, state.filter.Traeningsstaelle);\r\n uppdateraInkommandeFilterMedNuvarandeVal(action.filter.Traeningspass, state.filter.Traeningspass);\r\n uppdateraInkommandeFilterMedNuvarandeVal(action.filter.Tidpunkt, state.filter.Tidpunkt);\r\n uppdateraInkommandeFilterMedNuvarandeVal(action.filter.LedareOrTraenare, state.filter.LedareOrTraenare);\r\n uppdateraInkommandeFilterMedNuvarandeVal(action.filter.Veckodag, state.filter.Veckodag);\r\n // todo: kanske bygga om flat filter här?\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, state.flatFilter, state.fritextTerm);\r\n return { ...state, filter: { ...action.filter }, filteredPassIds: filteredPassIds };\r\n }\r\n\r\n case PassFilterActionType.PassFilterVisaFilter: {\r\n return { ...state, filterSynligt: action.visa };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetKategoriVald: {\r\n return { ...state, oeppenKategori: action.vald ? action.kategori : undefined };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetFilterValt: {\r\n const filt = { ...state.filter };\r\n const filterKategori = filt[action.kategori];\r\n if (!filterKategori) {\r\n return state;\r\n }\r\n const vaerde = filterKategori.vaerden.find(v => v.namn === action.namn);\r\n if (!vaerde || isFiltervalGrupp(vaerde)) {\r\n return state;\r\n }\r\n vaerde.vald = action.vald;\r\n const flat = { ...state.flatFilter };\r\n const flatKategori = flat[action.kategori];\r\n if (vaerde.vald) {\r\n flatKategori.push(vaerde.vaerde);\r\n } else {\r\n flatKategori.splice(flatKategori.indexOf(vaerde.vaerde), 1);\r\n }\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filter: filt,\r\n filteredPassIds: filteredPassIds,\r\n valtFavoritFilterId: undefined,\r\n flatFilter: flat,\r\n };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetAllaIFiltergruppVald: {\r\n const filt = { ...state.filter };\r\n const filterKategori = filt[action.kategori];\r\n if (!filterKategori) {\r\n return state;\r\n }\r\n const vaerde = filterKategori.vaerden.find(v => v.namn === action.filtergruppNamn);\r\n if (!vaerde || !isFiltervalGrupp(vaerde)) {\r\n return state;\r\n }\r\n const flat = { ...state.flatFilter };\r\n const flatKategori = flat[action.kategori];\r\n vaerde.filterval.forEach(f => {\r\n f.vald = action.vald;\r\n if (f.vald) {\r\n flatKategori.push(f.vaerde);\r\n } else {\r\n flatKategori.splice(flatKategori.indexOf(f.vaerde), 1);\r\n }\r\n });\r\n\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filter: filt,\r\n filteredPassIds: filteredPassIds,\r\n valtFavoritFilterId: undefined,\r\n flatFilter: flat,\r\n };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetFilterIGruppVald: {\r\n const filt = { ...state.filter };\r\n const filterKategori = filt[action.kategori];\r\n if (!filterKategori) {\r\n return state;\r\n }\r\n const vaerde = filterKategori.vaerden.find(v => v.namn === action.filtergruppNamn);\r\n if (!vaerde || !isFiltervalGrupp(vaerde)) {\r\n return state;\r\n }\r\n const filterVal = vaerde.filterval.find(f => f.namn === action.filter);\r\n if (!filterVal) {\r\n return state;\r\n }\r\n filterVal.vald = action.vald;\r\n const flat = { ...state.flatFilter };\r\n const flatKategori = flat[action.kategori];\r\n if (filterVal.vald) {\r\n flatKategori.push(filterVal.vaerde);\r\n } else {\r\n flatKategori.splice(flatKategori.indexOf(filterVal.vaerde), 1);\r\n }\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filter: filt,\r\n filteredPassIds: filteredPassIds,\r\n valtFavoritFilterId: undefined,\r\n flatFilter: flat,\r\n };\r\n }\r\n\r\n case PassFilterActionType.PassFilterSetFiltergruppOeppnad: {\r\n const filt = { ...state.filter };\r\n const filterKategori = filt[action.kategori];\r\n if (!filterKategori) {\r\n return state;\r\n }\r\n const vaerde = filterKategori.vaerden.find(v => v.namn === action.filtergruppNamn);\r\n if (!vaerde || !isFiltervalGrupp(vaerde)) {\r\n return state;\r\n }\r\n vaerde.oeppen = action.oeppnad;\r\n return { ...state, filter: filt };\r\n }\r\n case PassFilterActionType.PassFilterCreateFavoritfilter: {\r\n const newFavorit = [...state.favoritFilter];\r\n newFavorit.push(action.filter);\r\n return { ...state, valtFavoritFilterId: action.filter.FilterId, favoritFilter: newFavorit };\r\n }\r\n case PassFilterActionType.PassFilterDeleteFavoritfilter: {\r\n const newFavorit = [...state.favoritFilter];\r\n newFavorit.splice(\r\n state.favoritFilter.findIndex(f => f.FilterId === action.filterId),\r\n 1\r\n );\r\n return {\r\n ...state,\r\n valtFavoritFilterId: state.valtFavoritFilterId === action.filterId ? undefined : state.valtFavoritFilterId,\r\n favoritFilter: newFavorit,\r\n };\r\n }\r\n case PassFilterActionType.PassFilterRensaFilter: {\r\n const newFilter = { ...state.filter };\r\n (Object.keys(newFilter) as (keyof typeof PassFilterKategorier)[]).forEach(f => {\r\n newFilter[f].vaerden.forEach(v => {\r\n if (isFiltervalGrupp(v)) {\r\n v.filterval.forEach(fv => {\r\n fv.vald = false;\r\n });\r\n } else {\r\n v.vald = false;\r\n }\r\n });\r\n });\r\n const flat: PassFilterFlatKategorier = {\r\n LedareOrTraenare: [],\r\n Tidpunkt: [],\r\n Traeningspass: [],\r\n Traeningsstaelle: [],\r\n Veckodag: [],\r\n };\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filter: newFilter,\r\n filteredPassIds: filteredPassIds,\r\n valtFavoritFilterId: undefined,\r\n flatFilter: flat,\r\n };\r\n }\r\n case PassFilterActionType.PassFilterSetFavoritfilterValt: {\r\n const favoritFilter = state.favoritFilter.find(f => f.FilterId === action.favoritFilterId);\r\n if (!favoritFilter) {\r\n return state;\r\n }\r\n const newFilter = { ...state.filter };\r\n const flat: PassFilterFlatKategorier = {\r\n Traeningspass: [...favoritFilter.Traeningspass],\r\n Traeningsstaelle: [...favoritFilter.Traeningsstaelle],\r\n Veckodag: [...favoritFilter.Veckodag],\r\n Tidpunkt: [...favoritFilter.Tidpunkt],\r\n LedareOrTraenare: [...favoritFilter.LedareOrTraenare],\r\n };\r\n appliceraFilterPaaKategori(newFilter.Traeningspass, favoritFilter.Traeningspass);\r\n appliceraFilterPaaKategori(newFilter.Traeningsstaelle, favoritFilter.Traeningsstaelle);\r\n appliceraFilterPaaKategori(newFilter.Veckodag, favoritFilter.Veckodag);\r\n appliceraFilterPaaKategori(newFilter.Tidpunkt, favoritFilter.Tidpunkt);\r\n appliceraFilterPaaKategori(newFilter.LedareOrTraenare, favoritFilter.LedareOrTraenare);\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filter: newFilter,\r\n filteredPassIds: filteredPassIds,\r\n valtFavoritFilterId: action.favoritFilterId,\r\n flatFilter: flat,\r\n };\r\n }\r\n case PassFilterActionType.PassFilterSetFavoritfilter: {\r\n return { ...state, favoritFilter: action.favoritfilter };\r\n }\r\n case PassFilterActionType.PassFilterSetFilterFraanCache: {\r\n const flat = { ...action.cache };\r\n const newFilter = { ...state.filter };\r\n appliceraFilterPaaKategori(newFilter.Traeningspass, flat.Traeningspass);\r\n appliceraFilterPaaKategori(newFilter.Traeningsstaelle, flat.Traeningsstaelle);\r\n appliceraFilterPaaKategori(newFilter.Veckodag, flat.Veckodag);\r\n appliceraFilterPaaKategori(newFilter.Tidpunkt, flat.Tidpunkt);\r\n appliceraFilterPaaKategori(newFilter.LedareOrTraenare, flat.LedareOrTraenare);\r\n const filteredPassIds = getFilteredPassIdByDay(state.unfilteredDays, flat, state.fritextTerm);\r\n return {\r\n ...state,\r\n filteredPassIds: filteredPassIds,\r\n filter: newFilter,\r\n flatFilter: flat,\r\n valtFavoritFilterId: flat.favoritFilter,\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum PaymentReadActionTypes {\r\n PaymentSucceded = 'PAYMENT_SUCCEDED',\r\n SignatureCases = 'AUTOGIRO_URL',\r\n PaymentMethods = 'PAYMENT_METHODS',\r\n Receipt = 'RECEIPT',\r\n ReceiptInfos = 'RECEIPT_INFOS',\r\n OrderId = 'ORDER_ID',\r\n}\r\n\r\nexport interface GetPaymentSuccededAction {\r\n type: PaymentReadActionTypes.PaymentSucceded;\r\n paymentSucceded: boolean;\r\n}\r\n\r\nexport interface SetSignatureCasesAction {\r\n type: PaymentReadActionTypes.SignatureCases;\r\n value: fos.api.SignatureCase[];\r\n}\r\n\r\nexport interface SetPaymentMethodsAction {\r\n type: PaymentReadActionTypes.PaymentMethods;\r\n value: fos.api.PaymentMethod[];\r\n}\r\n\r\nexport interface SetReceiptAction {\r\n type: PaymentReadActionTypes.Receipt;\r\n value: fos.api.Receipt;\r\n}\r\nexport interface SetReceiptInfosAction {\r\n type: PaymentReadActionTypes.ReceiptInfos;\r\n value: fos.api.ReceiptInfo[];\r\n}\r\n\r\nexport interface SetOrderIdAction {\r\n type: PaymentReadActionTypes.OrderId;\r\n value: number;\r\n}\r\n\r\nexport type PaymentReadActions =\r\n | GetPaymentSuccededAction\r\n | SetSignatureCasesAction\r\n | SetPaymentMethodsAction\r\n | SetReceiptAction\r\n | SetReceiptInfosAction\r\n | SetOrderIdAction;\r\n\r\nexport const getPaymentSuccededAction = (): GetPaymentSuccededAction => ({\r\n type: PaymentReadActionTypes.PaymentSucceded,\r\n paymentSucceded: true,\r\n});\r\n\r\nexport const setSignatureCasesAction = (signatureCases: fos.api.SignatureCase[]): SetSignatureCasesAction => ({\r\n type: PaymentReadActionTypes.SignatureCases,\r\n value: signatureCases,\r\n});\r\n\r\nexport const setPaymentMethodsAction = (paymentMethods: fos.api.PaymentMethod[]): SetPaymentMethodsAction => ({\r\n type: PaymentReadActionTypes.PaymentMethods,\r\n value: paymentMethods,\r\n});\r\n\r\nexport const setReceiptAction = (receipt: fos.api.Receipt): SetReceiptAction => ({\r\n type: PaymentReadActionTypes.Receipt,\r\n value: receipt,\r\n});\r\n\r\nexport const setReceiptInfosAction = (receiptInfos: fos.api.ReceiptInfo[]): SetReceiptInfosAction => ({\r\n type: PaymentReadActionTypes.ReceiptInfos,\r\n value: receiptInfos,\r\n});\r\n\r\nexport const setOrderIdAction = (orderId: number): SetOrderIdAction => ({\r\n type: PaymentReadActionTypes.OrderId,\r\n value: orderId,\r\n});\r\n","import {\r\n PassFilterActionType,\r\n PassFilterActionSetKategoriVald,\r\n PassFilterActionSetFilterValt,\r\n PassFilterActionSetAllaIFiltergruppVald,\r\n PassFilterActionSetFilterIGruppVald,\r\n PassFilterActionSetFiltergruppOeppnad,\r\n PassFilterActionSetFavoritfilterValt,\r\n PassFilterActionCreateFavoritfilter,\r\n PassFilterRensaFilter,\r\n PassFilterVisaFilter,\r\n PassFilterSetFilter,\r\n PassFilterUpdateUnfilteredDays,\r\n PassFilterActionSetFavoritfilter,\r\n PassFilterActionDeleteFavoritfilter,\r\n PassFilterActionSetFilterFraanCache,\r\n PassFilterActionSetFritextTerm,\r\n} from './passFilterActions';\r\nimport {\r\n PassFilterKategorier,\r\n PassFilterFavoritfilter,\r\n PassFilterFiltrerbaraKategorier,\r\n PassFilterFilterCache,\r\n} from '.';\r\nimport { DayViewObject } from 'models/Day';\r\n\r\nexport const passFilterSetKategoriVald = (\r\n kategori: keyof typeof PassFilterKategorier,\r\n vald: boolean\r\n): PassFilterActionSetKategoriVald => ({\r\n type: PassFilterActionType.PassFilterSetKategoriVald,\r\n kategori,\r\n vald,\r\n});\r\n\r\nexport const passFilterSetFilterValt = (\r\n kategori: keyof typeof PassFilterKategorier,\r\n namn: string,\r\n vald: boolean\r\n): PassFilterActionSetFilterValt => ({ type: PassFilterActionType.PassFilterSetFilterValt, kategori, namn, vald });\r\n\r\nexport const passFilterSetAllaIFiltergruppVald = (\r\n kategori: keyof typeof PassFilterKategorier,\r\n filtergruppNamn: string,\r\n vald: boolean\r\n): PassFilterActionSetAllaIFiltergruppVald => ({\r\n type: PassFilterActionType.PassFilterSetAllaIFiltergruppVald,\r\n kategori,\r\n filtergruppNamn,\r\n vald,\r\n});\r\n\r\nexport const passFilterSetFilterIGruppVald = (\r\n kategori: keyof typeof PassFilterKategorier,\r\n filtergruppNamn: string,\r\n filter: string,\r\n vald: boolean\r\n): PassFilterActionSetFilterIGruppVald => ({\r\n type: PassFilterActionType.PassFilterSetFilterIGruppVald,\r\n kategori,\r\n filtergruppNamn,\r\n filter,\r\n vald,\r\n});\r\n\r\nexport const passFilterSetFiltergruppOeppnad = (\r\n kategori: keyof typeof PassFilterKategorier,\r\n filtergruppNamn: string,\r\n oeppnad: boolean\r\n): PassFilterActionSetFiltergruppOeppnad => ({\r\n type: PassFilterActionType.PassFilterSetFiltergruppOeppnad,\r\n kategori,\r\n filtergruppNamn,\r\n oeppnad,\r\n});\r\n\r\nexport const passFilterSetFavoritfilterValt = (favoritFilterId: number): PassFilterActionSetFavoritfilterValt => ({\r\n type: PassFilterActionType.PassFilterSetFavoritfilterValt,\r\n favoritFilterId,\r\n});\r\n\r\nexport const passFilterCreateFavoritfilter = (\r\n filter: PassFilterFavoritfilter\r\n): PassFilterActionCreateFavoritfilter => ({\r\n type: PassFilterActionType.PassFilterCreateFavoritfilter,\r\n filter,\r\n});\r\n\r\nexport const passFilterDeleteFavoritfilter = (filterId: number): PassFilterActionDeleteFavoritfilter => ({\r\n type: PassFilterActionType.PassFilterDeleteFavoritfilter,\r\n filterId,\r\n});\r\n\r\nexport const passFilterRensaFilter = (): PassFilterRensaFilter => ({\r\n type: PassFilterActionType.PassFilterRensaFilter,\r\n});\r\n\r\nexport const passFilterVisaFilter = (visa: boolean): PassFilterVisaFilter => ({\r\n type: PassFilterActionType.PassFilterVisaFilter,\r\n visa,\r\n});\r\n\r\nexport const passFilterSetFilter = (filter: PassFilterFiltrerbaraKategorier): PassFilterSetFilter => ({\r\n type: PassFilterActionType.PassFilterSetFilter,\r\n filter,\r\n});\r\n\r\nexport const passFilterUpdateUnfilteredDays = (\r\n unfilteredDays: DayViewObject\r\n): PassFilterUpdateUnfilteredDays => ({\r\n type: PassFilterActionType.PassFilterUpdateUnfilteredDays,\r\n unfilteredDays,\r\n});\r\n\r\nexport const passFilterSetFavoritfilter = (\r\n favoritfilter: PassFilterFavoritfilter[]\r\n): PassFilterActionSetFavoritfilter => ({\r\n type: PassFilterActionType.PassFilterSetFavoritfilter,\r\n favoritfilter,\r\n});\r\n\r\nexport const passFilterSetFilterFraanCache = (cache: PassFilterFilterCache): PassFilterActionSetFilterFraanCache => ({\r\n type: PassFilterActionType.PassFilterSetFilterFraanCache,\r\n cache,\r\n});\r\n\r\nexport const passFilterSetFritextTerm = (term: string): PassFilterActionSetFritextTerm => ({\r\n type: PassFilterActionType.PassFilterSetFritextTerm,\r\n term,\r\n});\r\n","import { api } from 'api';\r\nimport { Dispatch, Action, RootState } from 'store';\r\nimport { PassFilterFavoritfilter, passFilterSetFavoritfilter, passFilterCreateFavoritfilter } from '.';\r\nimport { passFilterDeleteFavoritfilter } from './passFilterDispatches';\r\n\r\nexport const getFavouriteFilters = (anvaendareId: number) => (dispatch: Dispatch) => {\r\n const promise = api.get(`PassFilter/GetPassFilter?anvaendareId=${anvaendareId}`, {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n let savedFilters: PassFilterFavoritfilter[] = result.result;\r\n dispatch(passFilterSetFavoritfilter(savedFilters));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const saveFavouriteFilter = (filter: PassFilterFavoritfilter) => (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => {\r\n const promise = api.post('PassFilter/AddPassFilter', filter, {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(passFilterCreateFavoritfilter(result.result));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const deleteFavouriteFilter = (filter: PassFilterFavoritfilter) => (dispatch: Dispatch) => {\r\n let favDelFilter = { PassFilter: filter.FilterName, UserId: filter.UserId };\r\n const promise = api.post('PassFilter/DeletePassFilter', favDelFilter, {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n promise.then(result => {\r\n if (!result.error && result.result) {\r\n dispatch(passFilterDeleteFavoritfilter(filter.FilterId));\r\n }\r\n });\r\n return promise;\r\n};","import { setShouldAcceptBookingRulesAction, setPassToBook } from './../global/session/sessionActions';\r\nimport { ThunkAction } from './../rootReducer';\r\nimport { api } from 'api';\r\nimport { Dispatch, RootState, Action } from 'store';\r\nimport { SortSortedIntoDaysViewObject, getDateTextForView } from 'websd/utils';\r\nimport { Day, getStatusMessage, SitecoreDictionary } from 'models';\r\nimport { updateDayData, updateBokaPassStatus } from './read';\r\n\r\nimport {\r\n FetchCommandTypes,\r\n executingCommand,\r\n executedCommand,\r\n executingCommandFailed,\r\n fetching,\r\n FetchStatusAggregateTypes,\r\n fetched,\r\n fetchedFailed,\r\n fetchingInBackground,\r\n} from '../global/fetch';\r\nimport { getNextBokning, getBookingsInBackground } from '../bokningar';\r\nimport { Mobile, isApp } from 'models/app/MobileOSType';\r\nimport { getQueryStringValue } from 'utils';\r\nimport { LocationActionTypes } from 'store/location';\r\nimport { allowBokaPass } from 'store/global/ui/sitecore/sitecoreActions';\r\nimport { setShouldShowCalendarSyncPopup } from 'store/global/calendar';\r\nimport { updatePassDetailsData } from 'store/pass-details/read';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getWeekdayName, getMonthName } from 'models/SitecoreDictionary';\r\nimport { PassFilterFiltrerbaraKategorier, passFilterSetFilter, passFilterUpdateUnfilteredDays } from '../passFilter';\r\nimport moment from 'moment';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\n\r\nconst arrangeShiftsInDateByTime = (passDaysList: Array>): Array> => {\r\n passDaysList.forEach((shiftsForDay, index) => {\r\n shiftsForDay.items = shiftsForDay.items.sort((pass1: fos.api.Pass, pass2: fos.api.Pass) => {\r\n const m1 = moment(pass1.StartTime);\r\n const m2 = moment(pass2.StartTime);\r\n return m1 < m2 ? -1 : m1 > m2 ? 1 : 0;\r\n });\r\n });\r\n return passDaysList;\r\n};\r\n\r\nexport const dispatchPassForScheduleReducer = (days: Array>, dispatch: Dispatch) => {\r\n const passDays: Array> = arrangeShiftsInDateByTime(days);\r\n const passDaysInViewObject = SortSortedIntoDaysViewObject(passDays);\r\n dispatch(passFilterUpdateUnfilteredDays(passDaysInViewObject));\r\n};\r\n\r\nexport const fetchPassListFromActiveFoereningInBackground =\r\n (): ThunkAction => (dispatch: Dispatch, getState: () => RootState) => {\r\n if (getState().location.type !== LocationActionTypes.PublicSchedule) {\r\n let foerening = getState().global.session.activeFoerening;\r\n if (!!foerening) {\r\n return dispatch(fetchPassListInBackground(foerening));\r\n }\r\n }\r\n let foereningName = getQueryStringValue('foerening');\r\n if (!!foereningName) {\r\n return dispatch(fetchPassListInBackground(-1, foereningName));\r\n }\r\n return null;\r\n };\r\n\r\nexport const fetchPassListInBackground =\r\n (foereningsId: number, foereningsName?: string) => (dispatch: Dispatch, getState: () => RootState) => {\r\n dispatch(\r\n fetchingInBackground(!!foereningsName ? foereningsName : foereningsId, FetchStatusAggregateTypes.PASS_LIST)\r\n );\r\n return dispatch<\r\n Promise>; filter: PassFilterFiltrerbaraKategorier }> | ErrorResult>\r\n >(fetchPassList(foereningsId, foereningsName));\r\n };\r\n\r\nexport const fetchPassListInForeground =\r\n (foereningsId: number, foereningsName?: string) => (dispatch: Dispatch, getState: () => RootState) => {\r\n dispatch(fetching(!!foereningsName ? foereningsName : foereningsId, FetchStatusAggregateTypes.PASS_LIST));\r\n return dispatch<\r\n Promise>; filter: PassFilterFiltrerbaraKategorier }> | ErrorResult>\r\n >(fetchPassList(foereningsId, foereningsName));\r\n };\r\n\r\nconst fetchPassList =\r\n (foereningsId: number, foereningsName?: string) => (dispatch: Dispatch, getState: () => RootState) => {\r\n const getPassListUrl = !!foereningsName\r\n ? `pass/GetPassListPublic?foereningsName=${foereningsName}`\r\n : `pass/GetPassList?foereningsId=${foereningsId}`;\r\n const promise = api.get<{ pass: Array>; filter: PassFilterFiltrerbaraKategorier }>(\r\n getPassListUrl,\r\n {\r\n muteErrorNotificationOnStatus: [406],\r\n anonymousCall: true,\r\n }\r\n );\r\n promise.then(result => {\r\n if (!result.error && result.result.pass) {\r\n const days = result.result.pass;\r\n const translate = getTranslate(getState().locale);\r\n days.forEach(d => {\r\n d.date = new Date(d.rawDate);\r\n d.key =\r\n translate((SitecoreDictionary.WeekDays as any)[getWeekdayName(d.date.getDay())]) +\r\n ', ' +\r\n d.date.getDate() +\r\n ' ' +\r\n translate((SitecoreDictionary.Months as any)[getMonthName(d.date.getMonth())]);\r\n });\r\n dispatch(updateDayData(days));\r\n dispatchPassForScheduleReducer(days, dispatch);\r\n dispatch(passFilterSetFilter(result.result.filter));\r\n dispatch(fetched(!!foereningsName ? foereningsName : foereningsId, FetchStatusAggregateTypes.PASS_LIST, days));\r\n } else {\r\n dispatch(fetchedFailed(!!foereningsName ? foereningsName : foereningsId, FetchStatusAggregateTypes.PASS_LIST));\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const bokaPassFromSitecore =\r\n (bokaPassRequest: BokningRequest, bokaKoePlats: boolean): ThunkAction =>\r\n dispatch => {\r\n const url = `Pass/${bokaKoePlats ? 'BokaKoePlats' : 'BokaPass'}/`;\r\n const promise = api.post(url, bokaPassRequest, {\r\n muteErrorNotificationOnStatus: [403, 412],\r\n });\r\n promise.then(res => {\r\n if (!res.error) {\r\n dispatch(updateBokaPassStatus(bokaPassRequest.passId, getStatusMessage(res.result.status), ''));\r\n } else if (res.result && res.result.http) {\r\n dispatch(updateBokaPassStatus(bokaPassRequest.passId, getStatusMessage(res.result.http.response.status), ''));\r\n if (res.result.http.status === 412) {\r\n dispatch(setShouldAcceptBookingRulesAction(true));\r\n }\r\n } else {\r\n dispatch(\r\n updateBokaPassStatus(\r\n bokaPassRequest.passId,\r\n getStatusMessage(SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR),\r\n ''\r\n )\r\n );\r\n }\r\n });\r\n };\r\n\r\nexport const bokaPass =\r\n (pass: fos.api.Pass, bokaKoePlats: boolean) => (dispatch: Dispatch, getState: () => RootState) => {\r\n dispatch(executingCommand(pass.PassId, FetchCommandTypes.BOKA_PASS));\r\n const foereningsId = getState().global.session.activeFoerening as number;\r\n const syncCalendar = getState().global.calendar.syncIsActive;\r\n const shouldShowPopup = getState().global.calendar.shouldShowCalendarSyncPopup;\r\n const request: BokningRequest = {\r\n passId: pass.PassId,\r\n foereningsId: foereningsId,\r\n };\r\n const url = `Pass/${bokaKoePlats ? 'BokaKoePlats' : 'BokaPass'}/`;\r\n const promise = api.post(url, request, {\r\n muteErrorNotificationOnStatus: [403, 412],\r\n });\r\n\r\n const filterUsed = getState().passFilter.flatFilter;\r\n const numberOfFiltersUsed =\r\n filterUsed.Veckodag.length +\r\n filterUsed.Traeningsstaelle.length +\r\n filterUsed.Traeningspass.length +\r\n filterUsed.Tidpunkt.length +\r\n filterUsed.LedareOrTraenare.length;\r\n\r\n promise.then(res => {\r\n dispatch(allowBokaPass());\r\n if (!res.error) {\r\n (window as any).dataLayer.push({\r\n event: 'bookedTraining',\r\n forening: pass.FoereningNamn,\r\n filterUsage: numberOfFiltersUsed > 0,\r\n NumberOfUsedfilters: numberOfFiltersUsed,\r\n });\r\n\r\n const status: string = getStatusMessage(res.result.status);\r\n res.result.pass.statusMessage = status;\r\n const allDays = getState().pass.read.days;\r\n const key = getDateTextForView(res.result.pass.StartTime);\r\n for (let i = 0; i < allDays.length; i++) {\r\n if (allDays[i].key === key) {\r\n for (let j = 0; allDays[i].items.length; j++) {\r\n if (allDays[i].items[j].PassId === res.result.pass.PassId) {\r\n allDays[i].items[j] = res.result.pass;\r\n const detailedPass = getState().passDetails.read.pass;\r\n if (!!detailedPass && detailedPass.PassId === res.result.pass.PassId) {\r\n detailedPass.AntalLedigaPlatser = res.result.pass.AntalLedigaPlatser;\r\n detailedPass.AntalBokningsbaraPlatser = res.result.pass.AntalBokningsbaraPlatser;\r\n detailedPass.AntalDropinPlatser = res.result.pass.AntalDropinPlatser;\r\n detailedPass.AntalIVaenteLista = res.result.pass.AntalIVaenteLista;\r\n detailedPass.AntalPlatserTotal = res.result.pass.AntalPlatserTotal;\r\n detailedPass.AntalBokningsbaraPlatserTotalt = res.result.pass.AntalBokningsbaraPlatserTotalt;\r\n detailedPass.LedigaKoePlatser = res.result.pass.LedigaKoePlatser;\r\n detailedPass.statusMessage = res.result.pass.statusMessage;\r\n detailedPass.BokningStatus = res.result.pass.BokningStatus;\r\n dispatch(updatePassDetailsData(detailedPass));\r\n }\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n dispatch(updateDayData(allDays));\r\n dispatch(updateBokaPassStatus(pass.PassId, status, key));\r\n dispatchPassForScheduleReducer(allDays, dispatch);\r\n dispatch(getBookingsInBackground());\r\n dispatch(getNextBokning());\r\n dispatch(executedCommand(pass.PassId, FetchCommandTypes.BOKA_PASS));\r\n if (syncCalendar && pass.BokningStatus === 'BOKNINGSBART') {\r\n var data = JSON.stringify(pass);\r\n Mobile.addToCalendar(data);\r\n } else if (!syncCalendar && shouldShowPopup && isApp() && pass.BokningStatus === 'BOKNINGSBART') {\r\n dispatch(setPassToBook(pass));\r\n dispatch(setShouldShowCalendarSyncPopup(true));\r\n }\r\n } else {\r\n const date = getDateTextForView(pass.StartTime);\r\n if (res.result.http && res.result.http.response) {\r\n dispatch(updateBokaPassStatus(pass.PassId, getStatusMessage(res.result.http.response.status), date));\r\n dispatchPassForScheduleReducer(getState().pass.read.days, dispatch);\r\n dispatch(executingCommandFailed(pass.PassId, FetchCommandTypes.BOKA_PASS));\r\n if (res.result.http.status === 412) {\r\n dispatch(setPassToBook(pass));\r\n dispatch(setShouldAcceptBookingRulesAction(true));\r\n }\r\n } else {\r\n dispatch(updateBokaPassStatus(pass.PassId, SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR, date));\r\n dispatchPassForScheduleReducer(getState().pass.read.days, dispatch);\r\n dispatch(executingCommandFailed(pass.PassId, FetchCommandTypes.BOKA_PASS));\r\n }\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport interface BokningResponse {\r\n status: string;\r\n koPlats: number;\r\n bokningId: string;\r\n pass: fos.api.Pass;\r\n}\r\n\r\nexport interface BokningRequest {\r\n passId: string | number;\r\n foereningsId: number;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { localStorage, isAccountNumberValid, isClearingNumberValid } from 'utils';\r\nimport { BasketActionTypes } from './';\r\n\r\nconst BASKET_STORAGE_PREFIX = 'BASKET::';\r\n\r\nexport interface BasketRootState {\r\n products: fos.api.Product[];\r\n valuta?: string;\r\n foereningId?: number;\r\n anlaeggningId?: number;\r\n errorOnPurchase?: string;\r\n errorsOnCreatePayment?: string[];\r\n errorsOnCreateUser?: string[];\r\n showMembershipMessage?: boolean;\r\n showCouponMessage?: boolean;\r\n autogiro: {\r\n clearingNumber: string;\r\n accountNumber: string;\r\n isAccountNumberValid?: boolean;\r\n isClearingNumberValid?: boolean;\r\n };\r\n paymentMethodId?: number;\r\n phoneNumber?: string;\r\n order?: fos.api.Order;\r\n}\r\n\r\nconst initialState: BasketRootState = {\r\n products: [],\r\n autogiro: {\r\n clearingNumber: '',\r\n accountNumber: '',\r\n },\r\n showMembershipMessage: false,\r\n showCouponMessage: false,\r\n};\r\n\r\nexport const BasketReducer: Reducer = (state = initialState, action: Action): BasketRootState => {\r\n let updatedState: BasketRootState = state;\r\n let shouldUpdateStorage: boolean = true;\r\n\r\n switch (action.type) {\r\n case BasketActionTypes.CREATE_BASKET:\r\n {\r\n const cachedBasket: BasketRootState | null = localStorage.getItemFromSession(\r\n BASKET_STORAGE_PREFIX + action.foereningId\r\n );\r\n updatedState = !cachedBasket\r\n ? {\r\n ...initialState,\r\n valuta: action.valuta,\r\n foereningId: action.foereningId,\r\n }\r\n : {\r\n ...(cachedBasket as BasketRootState),\r\n valuta: action.valuta || cachedBasket.valuta,\r\n autogiro: {\r\n ...initialState.autogiro,\r\n },\r\n foereningId: action.foereningId,\r\n };\r\n }\r\n break;\r\n case BasketActionTypes.UPDATE_BASKET:\r\n // @Speed bleh\r\n updatedState.products = JSON.parse(JSON.stringify(action.products));\r\n\r\n localStorage.saveItemInSession(BASKET_STORAGE_PREFIX + action.foereningId, {\r\n ...updatedState,\r\n autogiro: {\r\n ...initialState.autogiro,\r\n },\r\n });\r\n break;\r\n case BasketActionTypes.DELETE_BASKET:\r\n shouldUpdateStorage = false;\r\n localStorage.removeItemFromSession(BASKET_STORAGE_PREFIX + action.foereningId);\r\n updatedState = initialState;\r\n break;\r\n case BasketActionTypes.ADD_PRODUCT:\r\n if (updatedState.products) {\r\n if (!existsInArray(updatedState.products, action.product) && action.foereningId !== undefined) {\r\n // Avoiding mutation\r\n updatedState.products = [...updatedState.products, action.product];\r\n }\r\n } else {\r\n updatedState.products = [action.product];\r\n }\r\n if (updatedState.foereningId !== action.foereningId && !!action.foereningId) {\r\n updatedState.foereningId = action.foereningId;\r\n }\r\n localStorage.saveItemInSession(BASKET_STORAGE_PREFIX + action.foereningId, {\r\n ...updatedState,\r\n autogiro: {\r\n ...initialState.autogiro,\r\n },\r\n });\r\n break;\r\n case BasketActionTypes.SHOW_MEMBERSHIP_MESSAGE:\r\n updatedState = {\r\n ...state,\r\n showMembershipMessage: action.showMembershipMessage,\r\n };\r\n break;\r\n case BasketActionTypes.SHOW_COUPON_MESSAGE:\r\n updatedState = {\r\n ...state,\r\n showCouponMessage: action.showCouponMessage,\r\n };\r\n break;\r\n case BasketActionTypes.DELETE_PRODUCT:\r\n if (action.foereningId !== state.foereningId) {\r\n break;\r\n }\r\n if (!state.products) {\r\n break;\r\n }\r\n const newProducts: fos.api.Product[] = [];\r\n state.products.forEach(p => {\r\n if ('' + p.Id !== '' + action.product.Id) {\r\n newProducts.push(p);\r\n }\r\n });\r\n updatedState.products = newProducts;\r\n localStorage.saveItemInSession('BASKET::' + action.foereningId, {\r\n ...updatedState,\r\n });\r\n break;\r\n case BasketActionTypes.ERROR_ON_PURCHASE:\r\n shouldUpdateStorage = false;\r\n updatedState = {\r\n ...state,\r\n errorOnPurchase: action.error,\r\n };\r\n break;\r\n case BasketActionTypes.ERROR_ON_CREATE_PAYMENT: {\r\n updatedState = { ...state, errorsOnCreatePayment: action.errors };\r\n break;\r\n }\r\n case BasketActionTypes.ERROR_ON_CREATE_USER: {\r\n updatedState = { ...state, errorsOnCreateUser: action.errors };\r\n break;\r\n }\r\n case BasketActionTypes.UPDATE_AUTOGIRO_ACCOUNT_NUMBER: {\r\n updatedState = {\r\n ...state,\r\n autogiro: {\r\n ...state.autogiro,\r\n accountNumber: action.value,\r\n isAccountNumberValid: isAccountNumberValid(action.value),\r\n },\r\n };\r\n break;\r\n }\r\n case BasketActionTypes.UPDATE_AUTOGIRO_CLEARING_NUMBER: {\r\n updatedState = {\r\n ...state,\r\n autogiro: {\r\n ...state.autogiro,\r\n clearingNumber: action.value,\r\n isClearingNumberValid: isClearingNumberValid(action.value),\r\n },\r\n };\r\n break;\r\n }\r\n case BasketActionTypes.UPDATE_PAYMENT_METHOD: {\r\n updatedState = {\r\n ...state,\r\n paymentMethodId: action.paymentMethodId,\r\n };\r\n break;\r\n }\r\n case BasketActionTypes.UPDATE_PHONE_NUMBER: {\r\n updatedState = {\r\n ...state,\r\n phoneNumber: action.phoneNumber,\r\n };\r\n break;\r\n }\r\n case BasketActionTypes.UPDATE_ORDER: {\r\n updatedState = {\r\n ...state,\r\n order: action.order,\r\n };\r\n break;\r\n }\r\n default:\r\n shouldUpdateStorage = false;\r\n break;\r\n }\r\n if (shouldUpdateStorage && updatedState.foereningId) {\r\n localStorage.saveItemInSession(BASKET_STORAGE_PREFIX + updatedState.foereningId, {\r\n ...updatedState,\r\n autogiro: {\r\n ...initialState.autogiro,\r\n },\r\n });\r\n }\r\n return updatedState;\r\n};\r\n\r\nfunction existsInArray(arr: Array, product: fos.api.Product) {\r\n for (var i = 0; i < arr.length; i++) {\r\n if (arr[i].Id === product.Id) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n","export enum SkapaNyAnvaendareStatus {\r\n Ok,\r\n Error,\r\n}\r\n","interface OverwriteUserReadAction {\r\n type: UserReadActionType.GET_USER;\r\n updatedUser: fos.api.User;\r\n}\r\n\r\nexport type UserReadAction =\r\n | OverwriteUserReadAction\r\n | RegisterUserIdAction\r\n | GetBetalningsmedelReadAction\r\n | GetAutogiroReadAction\r\n | GetLanguageCodeReadAction;\r\n\r\nexport interface RegisterUserIdAction {\r\n type: UserReadActionType.RegisterUserId;\r\n userId: string;\r\n}\r\n\r\nexport interface GetBetalningsmedelReadAction {\r\n type: UserReadActionType.GET_BETALNINGSMEDEL;\r\n betalningsmedel: fos.api.Betalningsmedel;\r\n}\r\n\r\nexport interface GetAutogiroReadAction {\r\n type: UserReadActionType.GET_AUTOGIRO;\r\n autogiro: fos.api.Autogiro;\r\n}\r\n\r\nexport interface GetLanguageCodeReadAction {\r\n type: UserReadActionType.GET_LANGUAGE_CODE;\r\n languageCode: string;\r\n}\r\n\r\nexport enum UserReadActionType {\r\n GET_USER = 'GET_USER',\r\n RegisterUserId = 'REGISTER_USER_ID',\r\n GET_BETALNINGSMEDEL = 'GET_BETALNINGSMEDEL',\r\n GET_AUTOGIRO = 'GET_AUTOGIRO',\r\n GET_LANGUAGE_CODE = 'GET_LANGUAGE_CODE',\r\n}\r\n\r\nexport const getUser = (newValue: fos.api.User): OverwriteUserReadAction => ({\r\n type: UserReadActionType.GET_USER,\r\n updatedUser: newValue,\r\n});\r\n\r\nexport const registerUserId = (userId: string): RegisterUserIdAction => ({\r\n type: UserReadActionType.RegisterUserId,\r\n userId,\r\n});\r\n\r\nexport const getBetalningsmedel = (betalningsmedel: fos.api.Betalningsmedel): GetBetalningsmedelReadAction => ({\r\n type: UserReadActionType.GET_BETALNINGSMEDEL,\r\n betalningsmedel: betalningsmedel,\r\n});\r\n\r\nexport const getAutogiro = (autogiro: fos.api.Autogiro): GetAutogiroReadAction => ({\r\n type: UserReadActionType.GET_AUTOGIRO,\r\n autogiro: autogiro,\r\n});\r\n\r\nexport const getLanguageCode = (languageCode: string): GetLanguageCodeReadAction => ({\r\n type: UserReadActionType.GET_LANGUAGE_CODE,\r\n languageCode,\r\n});\r\n","import { Reducer } from 'redux';\r\nimport { PaymentReadActionTypes } from './';\r\nimport { Action } from 'store';\r\n\r\nexport interface PaymentReadState {\r\n paymentSucceded?: boolean;\r\n signatureCases?: fos.api.SignatureCase[];\r\n paymentMethods?: fos.api.PaymentMethod[];\r\n receipt?: fos.api.Receipt;\r\n receiptInfos?: fos.api.ReceiptInfo[];\r\n orderId?: number;\r\n}\r\n\r\nconst initialState: PaymentReadState = {};\r\n\r\nexport const paymentReadReducer: Reducer = (\r\n state: PaymentReadState = initialState,\r\n action: Action\r\n): PaymentReadState => {\r\n switch (action.type) {\r\n case PaymentReadActionTypes.PaymentSucceded:\r\n return {\r\n ...state,\r\n paymentSucceded: action.paymentSucceded,\r\n };\r\n case PaymentReadActionTypes.SignatureCases:\r\n return {\r\n ...state,\r\n signatureCases: action.value,\r\n };\r\n case PaymentReadActionTypes.PaymentMethods:\r\n return {\r\n ...state,\r\n paymentMethods: action.value,\r\n };\r\n case PaymentReadActionTypes.Receipt:\r\n return {\r\n ...state,\r\n receipt: action.value,\r\n };\r\n case PaymentReadActionTypes.ReceiptInfos:\r\n return {\r\n ...state,\r\n receiptInfos: action.value,\r\n };\r\n case PaymentReadActionTypes.OrderId:\r\n return {\r\n ...state,\r\n orderId: action.value,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { initialCommand } from 'store/global/fetch/fetchActions';\r\nimport { RootState, ThunkAction } from 'store';\r\nimport { addProduct, onCreateUserError, updateBasket, onCreatePaymentError } from './basketActions';\r\nimport { createBasket } from '.';\r\nimport { logout, authenticateAndSetupUser } from 'store/auth';\r\nimport { LocationActionTypes, switchView, redirectTo } from 'store/location';\r\nimport { getSubscriptionsDetails, ProductTypes, getProducts } from 'store/shop';\r\nimport { api } from 'api';\r\nimport { CreateUserState } from 'store/user/createUserCmd';\r\nimport { executingCommandFailed, FetchCommandTypes, executingCommand, executedCommand } from 'store/global/fetch';\r\nimport { ProductPaymentMethod } from 'models';\r\nimport { setSignatureCasesAction } from 'store/payment/read';\r\nimport { setOrderId } from 'store/global/session';\r\n\r\nexport const buySubscriptionOnTheFly =\r\n (item: fos.api.Medlemskap): ThunkAction =>\r\n async (dispatch, getState) => {\r\n const state = getState();\r\n let foereningId: number;\r\n if (!state.global.session.shopFoerening) {\r\n dispatch(logout());\r\n return;\r\n } else {\r\n foereningId = state.global.session.shopFoerening;\r\n }\r\n\r\n try {\r\n const res = await getSubscriptionsDetails(item, state.global.session.shopFoerening)(dispatch, getState);\r\n if (state.shoppingBasket.foereningId !== foereningId) {\r\n dispatch(createBasket(foereningId));\r\n }\r\n if (item.ProductId && !basketHasProduct(item.ProductId, state)) {\r\n dispatch(addProduct(res, foereningId));\r\n }\r\n dispatch(switchView(LocationActionTypes.ShoppingBasket));\r\n } catch {\r\n return;\r\n }\r\n };\r\n\r\nexport const buyTrainingCardOnTheFly =\r\n (item: fos.api.Traeningskort): ThunkAction =>\r\n async (dispatch, getState) => {\r\n const state = getState();\r\n if (!state.global.session.activeFoerening) {\r\n dispatch(logout());\r\n return;\r\n }\r\n const foereningId = state.global.session.activeFoerening;\r\n try {\r\n let products = state.product.unfilteredProducts;\r\n if (products.length === 0) {\r\n products = await dispatch>>(getProducts(foereningId));\r\n }\r\n const res = products.find(p => '' + p.Id === item.ProductId);\r\n if (state.shoppingBasket.foereningId !== foereningId) {\r\n dispatch(createBasket(foereningId));\r\n } else {\r\n dispatch(updateBasket(foereningId, []));\r\n localStorage.removeItem('ORDER::' + foereningId);\r\n dispatch(setOrderId(undefined));\r\n }\r\n if (!res) {\r\n dispatch(switchView(LocationActionTypes.Shop));\r\n return;\r\n }\r\n dispatch(addProduct(res, foereningId));\r\n dispatch(switchView(LocationActionTypes.ShoppingBasket));\r\n } catch {\r\n return;\r\n }\r\n };\r\n\r\nexport const buyBasket = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const inloggadeFoerening = state.global.session.shopFoerening || state.shoppingBasket.foereningId;\r\n if (!inloggadeFoerening || !state.shoppingBasket.products) {\r\n return;\r\n }\r\n dispatch(executingCommand(inloggadeFoerening.toString(), FetchCommandTypes.BUY_BASKET));\r\n\r\n const autogiroInfo: fos.api.BankAccountInfo | undefined = state.shoppingBasket.products.find(\r\n prod => prod.PaymentMethod === ProductPaymentMethod.AutoGiro\r\n )\r\n ? {\r\n BankAccountNumber: state.shoppingBasket.autogiro.accountNumber,\r\n ClearingNumber: state.shoppingBasket.autogiro.clearingNumber,\r\n }\r\n : undefined;\r\n const orderId = state.global.session.orderId;\r\n if (!orderId) {\r\n return;\r\n }\r\n const newWindow = window.open();\r\n api\r\n .post('Order/GetPaymentUrl', {\r\n foereningId: inloggadeFoerening,\r\n bankAccountInfo: autogiroInfo,\r\n userId: state.user.read.user.Id,\r\n orderId,\r\n paymentMethod: state.shoppingBasket.paymentMethodId,\r\n phoneNumber: state.shoppingBasket.phoneNumber,\r\n })\r\n .then(res => {\r\n if (!res.error && res.result) {\r\n dispatch(executedCommand(inloggadeFoerening.toString(), FetchCommandTypes.BUY_BASKET));\r\n if (!!res.result.SignatureCases && !!res.result.SignatureCases.find(s => !s.signed)) {\r\n // Måste signera köpet\r\n dispatch(setSignatureCasesAction(res.result.SignatureCases));\r\n }\r\n if (newWindow && res.result.Url) {\r\n newWindow.location.href = res.result.Url;\r\n }\r\n } else {\r\n if (res.error && res.result && res.result.http && res.result.http.response && res.result.http.response.Error) {\r\n const errors: string[] = [res.result.http.response.Error];\r\n dispatch(onCreatePaymentError(errors));\r\n }\r\n dispatch(executingCommandFailed(inloggadeFoerening.toString(), FetchCommandTypes.BUY_BASKET));\r\n if (newWindow) {\r\n newWindow.close();\r\n }\r\n }\r\n });\r\n};\r\n\r\nexport const createUser =\r\n (user: CreateUserState): ThunkAction =>\r\n (dispatch, getState) => {\r\n const state = getState();\r\n if (!state.global.session.shopFoerening) {\r\n return;\r\n }\r\n\r\n const requestBody: fos.api.CreateUser = {\r\n ...user,\r\n foereningId: parseInt(state.global.session.shopFoerening.toString(), 10),\r\n spraakId: state.global.ui.language.id,\r\n };\r\n dispatch(executingCommand('-1', FetchCommandTypes.SKAPA_ANVAENDARE));\r\n const promise = api.post(\r\n 'Anvaendare/SkapaNyAnvaendare',\r\n requestBody,\r\n {\r\n anonymousCall: true,\r\n muteErrorNotificationOnStatus: [406, 409],\r\n }\r\n );\r\n promise.then(res => {\r\n if (!res.error) {\r\n dispatch(executedCommand('-1', FetchCommandTypes.SKAPA_ANVAENDARE));\r\n dispatch(authenticateAndSetupUser(res.result.authToken, state.global.ui.language.id));\r\n if (state.location.type === LocationActionTypes.PublicRegister) {\r\n dispatch(redirectTo(LocationActionTypes.ShoppingBasket));\r\n } else if (state.location.type === LocationActionTypes.AdminRegister) {\r\n dispatch(redirectTo(LocationActionTypes.AdminShoppingBasket));\r\n }\r\n } else {\r\n dispatch(executingCommandFailed('-1', FetchCommandTypes.SKAPA_ANVAENDARE));\r\n if (!!res.result.http && !!res.result.http.response) {\r\n const errors = res.result.http.response.errors;\r\n dispatch(onCreateUserError(errors));\r\n }\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const addMembership = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n\r\n if (!!state.shoppingBasket && !!state.shoppingBasket.products) {\r\n const medlemskapInBasket = state.shoppingBasket.products.find(\r\n p => p.Types.find(t => t === ProductTypes.Medlemskap) && p.Namn.includes(new Date().getFullYear().toString())\r\n );\r\n if (!!medlemskapInBasket) {\r\n return;\r\n }\r\n }\r\n\r\n const foereningId = state.global.session.shopFoerening;\r\n if (!foereningId) {\r\n return;\r\n }\r\n const products = state.product.unfilteredProducts;\r\n let medlemskap = products.find(\r\n p => !!p.Types.find(t => t === ProductTypes.Medlemskap) && p.Namn.includes(new Date().getFullYear().toString())\r\n );\r\n\r\n if (!!medlemskap) {\r\n dispatch(addProduct(medlemskap, foereningId));\r\n } else {\r\n medlemskap = products.find(p => !!p.Types.find(t => t === ProductTypes.Medlemskap));\r\n if (!!medlemskap) {\r\n dispatch(addProduct(medlemskap, foereningId));\r\n }\r\n }\r\n};\r\n\r\nexport const resetBuyBasketCommand = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (state.global.session.shopFoerening) {\r\n dispatch(initialCommand(state.global.session.shopFoerening.toString(), FetchCommandTypes.BUY_BASKET));\r\n } else {\r\n dispatch(initialCommand('-1', FetchCommandTypes.BUY_BASKET));\r\n }\r\n};\r\n\r\nfunction basketHasProduct(productId: string, state: RootState): boolean {\r\n let result: boolean = false;\r\n const productsList = state.shoppingBasket.products;\r\n if (productsList && productsList.length > 0) {\r\n productsList.forEach(p => (p.Id.toString() === productId ? (result = true) : null));\r\n }\r\n return result;\r\n}\r\n","export enum UpdateUserProfileCmdActionTypes {\r\n UpdateUser = 'UPDATE_USER',\r\n ClearUser = 'CLEAR_USER',\r\n ErrorCode = 'ERROR_CODE',\r\n ClearErrorCode = 'CLEAR_ERROR_CODE',\r\n}\r\n\r\ninterface UpdateUserProfileCmdAction {\r\n type: UpdateUserProfileCmdActionTypes.UpdateUser;\r\n user: fos.api.User;\r\n}\r\n\r\ninterface SetUserProfileCmdErrorCodeAction {\r\n type: UpdateUserProfileCmdActionTypes.ErrorCode;\r\n errorCode: number;\r\n}\r\n\r\ninterface ClearUserProfileCmdErrorCodeAction {\r\n type: UpdateUserProfileCmdActionTypes.ClearErrorCode;\r\n}\r\n\r\ninterface ClearUpdateUserProfileCmdAction {\r\n type: UpdateUserProfileCmdActionTypes.ClearUser;\r\n}\r\n\r\nexport const updateUser = (user: fos.api.User): UpdateUserProfileCmdAction => ({\r\n type: UpdateUserProfileCmdActionTypes.UpdateUser,\r\n user: user,\r\n});\r\n\r\nexport const setUpdateUserCmdErrorCode = (errorCode: number): SetUserProfileCmdErrorCodeAction => ({\r\n type: UpdateUserProfileCmdActionTypes.ErrorCode,\r\n errorCode,\r\n});\r\n\r\nexport const clearUpdateUserCmdErrorCode = (): ClearUserProfileCmdErrorCodeAction => ({\r\n type: UpdateUserProfileCmdActionTypes.ClearErrorCode,\r\n});\r\n\r\nexport const clearCachedUser = (): ClearUpdateUserProfileCmdAction => ({\r\n type: UpdateUserProfileCmdActionTypes.ClearUser,\r\n});\r\n\r\nexport type UpdateUserProfileCmdActions =\r\n | UpdateUserProfileCmdAction\r\n | ClearUpdateUserProfileCmdAction\r\n | SetUserProfileCmdErrorCodeAction\r\n | ClearUserProfileCmdErrorCodeAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UserReadActionType } from './userReadActions';\r\n\r\nexport interface UserReadState {\r\n user: fos.api.User;\r\n betalningsmedel: fos.api.Betalningsmedel;\r\n languageCode: string;\r\n}\r\n\r\nconst initialState: UserReadState = {\r\n user: {\r\n Id: '',\r\n FirstName: '',\r\n LastName: '',\r\n Address: '',\r\n ZipCode: '',\r\n City: '',\r\n PhoneNumber: '',\r\n Email: '',\r\n SSN: '',\r\n businessUnit: {\r\n id: 0,\r\n namn: '',\r\n },\r\n },\r\n betalningsmedel: {\r\n BankkortLista: [],\r\n AutogiroLista: [],\r\n AvtalegiroLista: [],\r\n IsEditEnabled: false,\r\n },\r\n languageCode: 'sv',\r\n};\r\n\r\nlet cachedAutogiroArray: fos.api.Autogiro[] = [];\r\n\r\nexport const userReadReducer: Reducer = (state = initialState, action: Action) => {\r\n const currentUserInfo = state.user;\r\n switch (action.type) {\r\n case UserReadActionType.GET_USER:\r\n return { ...state, user: action.updatedUser };\r\n case UserReadActionType.RegisterUserId:\r\n return {\r\n ...state,\r\n user: {\r\n ...currentUserInfo,\r\n Id: action.userId,\r\n },\r\n };\r\n case UserReadActionType.GET_BETALNINGSMEDEL:\r\n return {\r\n ...state,\r\n betalningsmedel: action.betalningsmedel,\r\n };\r\n case UserReadActionType.GET_AUTOGIRO:\r\n let newState: Array = state.betalningsmedel.AutogiroLista.map(t => {\r\n if (t.Id !== action.autogiro.Id) {\r\n return t;\r\n } else {\r\n return action.autogiro;\r\n }\r\n });\r\n cachedAutogiroArray = newState;\r\n return {\r\n ...state,\r\n betalningsmedel: {\r\n ...state.betalningsmedel,\r\n AutogiroLista: cachedAutogiroArray,\r\n },\r\n };\r\n case UserReadActionType.GET_LANGUAGE_CODE:\r\n return {\r\n ...state,\r\n languageCode: action.languageCode,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { PersonLookupStatus } from 'models';\r\n\r\nexport enum CreateUserActionType {\r\n Update_SSN = 'UPDATE_SSN',\r\n Update_FirstName = 'UPDATE_FIRSTNAME',\r\n Update_LastName = 'UPDATE_LASTNAME',\r\n Update_Email = 'UPDATE_EMAIL',\r\n Update_Telephone = 'UPDATE_TELEPHONE',\r\n Update_Street = 'UPDATE_STREET',\r\n Update_ZipCode = 'UPDATE_ZIPCODE',\r\n Update_City = 'UPDATE_CITY',\r\n Update_Password = 'UPDATE_PASSWORD',\r\n Update_RepeatPassword = 'UPDATE_REPEATPASSWORD',\r\n Update_HasNoSwedishSsn = 'UPDATE_HASNOSWEDISHSSN',\r\n Update_AnlaeggningsId = 'UPDATE_ANLAEGGNINGSID',\r\n Update_LookupStatus = 'UPDATE_LOOKUPSTATUS',\r\n}\r\n\r\nexport interface UpdateSSN {\r\n type: CreateUserActionType.Update_SSN;\r\n value: string;\r\n}\r\nexport interface UpdateAnlaeggningsId {\r\n type: CreateUserActionType.Update_AnlaeggningsId;\r\n value: string;\r\n}\r\nexport interface UpdateFirstName {\r\n type: CreateUserActionType.Update_FirstName;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateLastName {\r\n type: CreateUserActionType.Update_LastName;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateEmail {\r\n type: CreateUserActionType.Update_Email;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateTelephone {\r\n type: CreateUserActionType.Update_Telephone;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateStreet {\r\n type: CreateUserActionType.Update_Street;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateZipCode {\r\n type: CreateUserActionType.Update_ZipCode;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateCity {\r\n type: CreateUserActionType.Update_City;\r\n value: string;\r\n}\r\n\r\nexport interface UpdatePassword {\r\n type: CreateUserActionType.Update_Password;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateRepeatPassword {\r\n type: CreateUserActionType.Update_RepeatPassword;\r\n value: string;\r\n}\r\n\r\nexport interface UpdateHasNoSwedishSsn {\r\n type: CreateUserActionType.Update_HasNoSwedishSsn;\r\n value: boolean;\r\n}\r\n\r\nexport interface UpdateLookupStatus {\r\n type: CreateUserActionType.Update_LookupStatus;\r\n value: PersonLookupStatus;\r\n}\r\n\r\nexport const updateSSN = (value: string): UpdateSSN => ({\r\n type: CreateUserActionType.Update_SSN,\r\n value,\r\n});\r\n\r\nexport const updateAnlaeggningsId = (value: string): UpdateAnlaeggningsId => ({\r\n type: CreateUserActionType.Update_AnlaeggningsId,\r\n value,\r\n});\r\n\r\nexport const updateFirstName = (value: string): UpdateFirstName => ({\r\n type: CreateUserActionType.Update_FirstName,\r\n value,\r\n});\r\n\r\nexport const updateLastName = (value: string): UpdateLastName => ({\r\n type: CreateUserActionType.Update_LastName,\r\n value,\r\n});\r\n\r\nexport const updateEmail = (value: string): UpdateEmail => ({\r\n type: CreateUserActionType.Update_Email,\r\n value,\r\n});\r\n\r\nexport const updateTelephone = (value: string): UpdateTelephone => ({\r\n type: CreateUserActionType.Update_Telephone,\r\n value,\r\n});\r\n\r\nexport const updateStreet = (value: string): UpdateStreet => ({\r\n type: CreateUserActionType.Update_Street,\r\n value,\r\n});\r\n\r\nexport const updateZipCode = (value: string): UpdateZipCode => ({\r\n type: CreateUserActionType.Update_ZipCode,\r\n value,\r\n});\r\n\r\nexport const updateCity = (value: string): UpdateCity => ({\r\n type: CreateUserActionType.Update_City,\r\n value,\r\n});\r\n\r\nexport const updatePassword = (value: string): UpdatePassword => ({\r\n type: CreateUserActionType.Update_Password,\r\n value,\r\n});\r\n\r\nexport const updateRepeatPassword = (value: string): UpdateRepeatPassword => ({\r\n type: CreateUserActionType.Update_RepeatPassword,\r\n value,\r\n});\r\n\r\nexport const updateHasNoSwedishSsn = (value: boolean): UpdateHasNoSwedishSsn => ({\r\n type: CreateUserActionType.Update_HasNoSwedishSsn,\r\n value,\r\n});\r\n\r\nexport const UpdateLookupStatus = (value: PersonLookupStatus): UpdateLookupStatus => ({\r\n type: CreateUserActionType.Update_LookupStatus,\r\n value,\r\n});\r\n\r\nexport type CreateUserAction =\r\n | UpdateSSN\r\n | UpdateAnlaeggningsId\r\n | UpdateFirstName\r\n | UpdateLastName\r\n | UpdateEmail\r\n | UpdateTelephone\r\n | UpdateStreet\r\n | UpdateZipCode\r\n | UpdateCity\r\n | UpdatePassword\r\n | UpdateRepeatPassword\r\n | UpdateHasNoSwedishSsn\r\n | UpdateLookupStatus;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UpdateUserProfileCmdActionTypes } from '.';\r\n\r\nexport interface UpdateUserProfileCmdState {\r\n user?: fos.api.User;\r\n errorCode?: number;\r\n}\r\n\r\nconst initialState: UpdateUserProfileCmdState = {};\r\n\r\nexport const updateUserProfileCmdReducer: Reducer = (\r\n state = initialState,\r\n action: Action\r\n): UpdateUserProfileCmdState => {\r\n switch (action.type) {\r\n case UpdateUserProfileCmdActionTypes.UpdateUser:\r\n return {\r\n ...state,\r\n user: action.user,\r\n };\r\n case UpdateUserProfileCmdActionTypes.ClearUser:\r\n return {\r\n ...state,\r\n user: undefined,\r\n };\r\n case UpdateUserProfileCmdActionTypes.ErrorCode:\r\n return {\r\n ...state,\r\n errorCode: action.errorCode,\r\n };\r\n case UpdateUserProfileCmdActionTypes.ClearErrorCode:\r\n return {\r\n ...state,\r\n errorCode: undefined,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Dispatch, Action, RootState, ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { FetchCommandTypes, executingCommandFailed, executedCommand, executingCommand } from 'store/global/fetch';\r\nimport { updateUser, clearUpdateUserCmdErrorCode, setUpdateUserCmdErrorCode } from '.';\r\nimport { getUser } from 'store/user/read';\r\n\r\nexport const updateUserProfileCmd = (FoereningId: number, User: fos.api.User, propertyName: string): ThunkAction => (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => {\r\n const cmdId = `${FoereningId.toString()}/${propertyName}`;\r\n dispatch(clearUpdateUserCmdErrorCode());\r\n dispatch(executingCommand(cmdId, FetchCommandTypes.SPARA_ANVAENDARE));\r\n const promise = api.post('ProfileInfo/Update?foereningId=' + FoereningId, User, {\r\n muteErrorNotificationOnStatus: [406, 409],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n let user: fos.api.User = User;\r\n dispatch(getUser(user));\r\n dispatch(executedCommand(cmdId, FetchCommandTypes.SPARA_ANVAENDARE));\r\n } else {\r\n // Kunde inte spara ProfileInfo.\r\n const state = getState();\r\n const originaleProfileData = state.user.read.user;\r\n if (result.result && result.result.http && !!result.result.http.status) {\r\n dispatch(setUpdateUserCmdErrorCode(result.result.http.status));\r\n }\r\n dispatch(executingCommandFailed(cmdId, FetchCommandTypes.SPARA_ANVAENDARE));\r\n dispatch(updateUser(originaleProfileData));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const initializeUpdateUserProfileCmd = (FoereningId: number, propertyName: string): ThunkAction => (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => {\r\n const cmdId = `${FoereningId.toString()}/${propertyName}`;\r\n dispatch(executingCommand(cmdId, FetchCommandTypes.SPARA_ANVAENDARE));\r\n};\r\n","export enum changePasswordActionType {\r\n UPDATE_CURRENT_PASSWORD_VALUE = 'USER/CHANGE_PASSWORD_CMD/UPDATE_CURRENT_PASSWORD_VALUE',\r\n UPDATE_NEW_PASSWORD_VALUE = 'USER/CHANGE_PASSWORD_CMD/UPDATE_NEW_PASSWORD_VALUE',\r\n UPDATE_REPEAT_NEW_PASSWORD_VALUE = 'USER/CHANGE_PASSWORD_CMD/UPDATE_REPEAT_NEW_PASSWORD_VALUE',\r\n UPDATE_NEW_PASSWORD_VALIDITY = 'USER/CHANGE_PASSWORD_CMD/UPDATE_NEW_PASSWORD_VALIDITY',\r\n UPDATE_REPEAT_NEW_PASSWORD_VALIDITY = 'USER/CHANGE_PASSWORD_CMD/UPDATE_REPEAT_NEW_PASSWORD_VALIDITY',\r\n UPDATE_CURRENT_PASSWORD_VALIDITY = 'USER/CHANGE_PASSWORD_CMD/UPDATE_CURRENT_PASSWORD_VALIDITY',\r\n UPDATE_FORM_VALIDITY = 'USER/CHANGE_PASSWORD_CMD/UPDATE_FORM_VALIDITY',\r\n CLEAR = 'USER/CHANGE_PASSWORD_CMD/CLEAR',\r\n}\r\n\r\ninterface SetCurrentPasswordAction {\r\n type: changePasswordActionType.UPDATE_CURRENT_PASSWORD_VALUE;\r\n newValue: string;\r\n}\r\n\r\ninterface SetNewPasswordAction {\r\n type: changePasswordActionType.UPDATE_NEW_PASSWORD_VALUE;\r\n newValue: string;\r\n}\r\n\r\ninterface SetRepeatNewPasswordAction {\r\n type: changePasswordActionType.UPDATE_REPEAT_NEW_PASSWORD_VALUE;\r\n newValue: string;\r\n}\r\n\r\ninterface SetNewPasswordValidityAction {\r\n type: changePasswordActionType.UPDATE_NEW_PASSWORD_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface SetRepeatNewPasswordValidityAction {\r\n type: changePasswordActionType.UPDATE_REPEAT_NEW_PASSWORD_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface SetCurrentPasswordValidityAction {\r\n type: changePasswordActionType.UPDATE_CURRENT_PASSWORD_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface SetFormValidityAction {\r\n type: changePasswordActionType.UPDATE_FORM_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface ClearCMDAction {\r\n type: changePasswordActionType.CLEAR;\r\n}\r\n\r\nconst setCurrentPassword = (newValue: string = ''): SetCurrentPasswordAction => ({\r\n type: changePasswordActionType.UPDATE_CURRENT_PASSWORD_VALUE,\r\n newValue,\r\n});\r\n\r\nconst setNewPassword = (newValue: string = ''): SetNewPasswordAction => ({\r\n type: changePasswordActionType.UPDATE_NEW_PASSWORD_VALUE,\r\n newValue,\r\n});\r\n\r\nconst setRepeatNewPassword = (newValue: string = ''): SetRepeatNewPasswordAction => ({\r\n type: changePasswordActionType.UPDATE_REPEAT_NEW_PASSWORD_VALUE,\r\n newValue,\r\n});\r\n\r\nconst setNewPasswordValidity = (isValid: boolean = false): SetNewPasswordValidityAction => ({\r\n type: changePasswordActionType.UPDATE_NEW_PASSWORD_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst setRepeatNewPasswordValidity = (isValid: boolean = false): SetRepeatNewPasswordValidityAction => ({\r\n type: changePasswordActionType.UPDATE_REPEAT_NEW_PASSWORD_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst setCurrentPasswordValidity = (isValid: boolean = false): SetCurrentPasswordValidityAction => ({\r\n type: changePasswordActionType.UPDATE_CURRENT_PASSWORD_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst setFormValidity = (isValid: boolean = false): SetFormValidityAction => ({\r\n type: changePasswordActionType.UPDATE_FORM_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst clearCmd = (): ClearCMDAction => ({\r\n type: changePasswordActionType.CLEAR,\r\n});\r\n\r\nexport const changePasswordActions = {\r\n setCurrentPassword,\r\n setNewPassword,\r\n setRepeatNewPassword,\r\n setNewPasswordValidity,\r\n setRepeatNewPasswordValidity,\r\n setCurrentPasswordValidity,\r\n setFormValidity,\r\n clearCmd,\r\n};\r\n\r\nexport type ChangePasswordAction =\r\n | SetCurrentPasswordAction\r\n | SetNewPasswordAction\r\n | SetRepeatNewPasswordAction\r\n | SetNewPasswordValidityAction\r\n | SetRepeatNewPasswordValidityAction\r\n | SetCurrentPasswordValidityAction\r\n | SetFormValidityAction\r\n | ClearCMDAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { CreateUserState, CreateUserActionType } from '.';\r\n\r\nconst initialState: CreateUserState = {\r\n personnr: '',\r\n foernamn: '',\r\n efternamn: '',\r\n epost: '',\r\n mobiltelefonnr: '',\r\n postkod: '',\r\n stad: '',\r\n gata: '',\r\n loesenord: '',\r\n anlaeggningsId: '0',\r\n loesenordRepeat: '',\r\n gdprTermsAccepted: false,\r\n hasNoSwedishSsn: false,\r\n};\r\n\r\nexport const createUserReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case CreateUserActionType.Update_SSN:\r\n return { ...state, personnr: action.value };\r\n\r\n case CreateUserActionType.Update_AnlaeggningsId:\r\n return { ...state, anlaeggningsId: action.value };\r\n\r\n case CreateUserActionType.Update_FirstName:\r\n return { ...state, foernamn: action.value };\r\n\r\n case CreateUserActionType.Update_LastName:\r\n return { ...state, efternamn: action.value };\r\n\r\n case CreateUserActionType.Update_Email:\r\n return { ...state, epost: action.value };\r\n\r\n case CreateUserActionType.Update_Telephone:\r\n return { ...state, mobiltelefonnr: action.value };\r\n\r\n case CreateUserActionType.Update_Street:\r\n return { ...state, gata: action.value };\r\n\r\n case CreateUserActionType.Update_ZipCode:\r\n return { ...state, postkod: action.value };\r\n\r\n case CreateUserActionType.Update_City:\r\n return { ...state, stad: action.value };\r\n\r\n case CreateUserActionType.Update_Password:\r\n return { ...state, loesenord: action.value };\r\n\r\n case CreateUserActionType.Update_RepeatPassword:\r\n return { ...state, loesenordRepeat: action.value };\r\n\r\n case CreateUserActionType.Update_HasNoSwedishSsn:\r\n return { ...state, hasNoSwedishSsn: action.value };\r\n\r\n case CreateUserActionType.Update_LookupStatus:\r\n return { ...state, lookupStatus: action.value };\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum updateAutogiroActionType {\r\n SET_CLEARING_NUMBER = 'USER/UPDATE_AUTOGIRO_CMD/SET_CLEARING_NUMBER',\r\n SET_ACCOUNT_NUMBER = 'USER/UPDATE_AUTOGIRO_CMD/SET_ACCOUNT_NUMBER',\r\n SET_AUTOGIRO_TO_UPDATE = 'USER/UPDATE_AUTOGIRO_CMD/SET_AUTOGIRO_TO_UPDATE',\r\n SET_CLEARING_NUMBER_VALIDITY = 'USER/UPDATE_AUTOGIRO_CMD/SET_CLEARING_NUMBER_VALIDITY',\r\n SET_ACCOUNT_NUMBER_VALIDITY = 'USER/UPDATE_AUTOGIRO_CMD/SET_ACCOUNT_NUMBER_VALIDITY',\r\n SET_ERROR_MESSAGE = 'USER/UPDATE_AUTOGIRO_CMD/SET_ERROR_MESSAGE',\r\n}\r\n\r\ninterface SetAutogiroToUpdateAction {\r\n type: updateAutogiroActionType.SET_AUTOGIRO_TO_UPDATE;\r\n id: string;\r\n currentClearingNumber: string;\r\n currentAccountNumber: string;\r\n}\r\n\r\ninterface SetClearingNumberAction {\r\n type: updateAutogiroActionType.SET_CLEARING_NUMBER;\r\n newValue: string;\r\n}\r\n\r\ninterface SetAccountNumberAction {\r\n type: updateAutogiroActionType.SET_ACCOUNT_NUMBER;\r\n newValue: string;\r\n}\r\n\r\ninterface SetClearingNumberValidityAction {\r\n type: updateAutogiroActionType.SET_CLEARING_NUMBER_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface SetAccountNumberValidityAction {\r\n type: updateAutogiroActionType.SET_ACCOUNT_NUMBER_VALIDITY;\r\n isValid: boolean;\r\n}\r\n\r\ninterface SetErrorMessageAction {\r\n type: updateAutogiroActionType.SET_ERROR_MESSAGE;\r\n errorMessage: string;\r\n}\r\n\r\nconst setAutogiroToUpdate = (\r\n id: string,\r\n currentClearingNumber: string,\r\n currentAccountNumber: string\r\n): SetAutogiroToUpdateAction => ({\r\n type: updateAutogiroActionType.SET_AUTOGIRO_TO_UPDATE,\r\n id,\r\n currentClearingNumber,\r\n currentAccountNumber,\r\n});\r\n\r\nconst setClearingNumber = (newValue: string = ''): SetClearingNumberAction => ({\r\n type: updateAutogiroActionType.SET_CLEARING_NUMBER,\r\n newValue,\r\n});\r\n\r\nconst setAccountNumber = (newValue: string = ''): SetAccountNumberAction => ({\r\n type: updateAutogiroActionType.SET_ACCOUNT_NUMBER,\r\n newValue,\r\n});\r\n\r\nconst setClearingNumberValidity = (isValid: boolean = false): SetClearingNumberValidityAction => ({\r\n type: updateAutogiroActionType.SET_CLEARING_NUMBER_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst setAccountNumberValidity = (isValid: boolean = false): SetAccountNumberValidityAction => ({\r\n type: updateAutogiroActionType.SET_ACCOUNT_NUMBER_VALIDITY,\r\n isValid,\r\n});\r\n\r\nconst setErrorMessage = (errorMessage: string): SetErrorMessageAction => ({\r\n type: updateAutogiroActionType.SET_ERROR_MESSAGE,\r\n errorMessage,\r\n});\r\n\r\nexport const updateAutogiroActions = {\r\n setClearingNumber,\r\n setAccountNumber,\r\n setAutogiroToUpdate,\r\n setClearingNumberValidity,\r\n setAccountNumberValidity,\r\n setErrorMessage,\r\n};\r\n\r\nexport type UpdateAutogiroAction =\r\n | SetClearingNumberAction\r\n | SetAccountNumberAction\r\n | SetAutogiroToUpdateAction\r\n | SetClearingNumberValidityAction\r\n | SetAccountNumberValidityAction\r\n | SetErrorMessageAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { changePasswordActionType as actionTypes } from './changePasswordActions';\r\n\r\nexport interface ChangePasswordState {\r\n currentPassword: string;\r\n newPassword: string;\r\n repeatNewPassword: string;\r\n isCurrentPasswordValid: boolean;\r\n isNewPasswordValid: boolean;\r\n isRepeatNewPasswordValid: boolean;\r\n isFormValid: boolean;\r\n}\r\n\r\nconst initialState: ChangePasswordState = {\r\n currentPassword: '',\r\n newPassword: '',\r\n repeatNewPassword: '',\r\n isCurrentPasswordValid: false,\r\n isNewPasswordValid: false,\r\n isRepeatNewPasswordValid: false,\r\n isFormValid: false,\r\n};\r\n\r\nexport const changePasswordReducer: Reducer = (\r\n state: ChangePasswordState = initialState,\r\n action: Action\r\n): ChangePasswordState => {\r\n switch (action.type) {\r\n case actionTypes.UPDATE_CURRENT_PASSWORD_VALUE:\r\n return {\r\n ...state,\r\n currentPassword: action.newValue,\r\n };\r\n case actionTypes.UPDATE_FORM_VALIDITY:\r\n return {\r\n ...state,\r\n isFormValid: action.isValid,\r\n };\r\n case actionTypes.UPDATE_NEW_PASSWORD_VALIDITY:\r\n return {\r\n ...state,\r\n isNewPasswordValid: action.isValid,\r\n };\r\n case actionTypes.UPDATE_REPEAT_NEW_PASSWORD_VALIDITY:\r\n return {\r\n ...state,\r\n isRepeatNewPasswordValid: action.isValid,\r\n };\r\n case actionTypes.UPDATE_CURRENT_PASSWORD_VALIDITY:\r\n return {\r\n ...state,\r\n isCurrentPasswordValid: action.isValid,\r\n };\r\n case actionTypes.UPDATE_NEW_PASSWORD_VALUE:\r\n return {\r\n ...state,\r\n newPassword: action.newValue,\r\n };\r\n case actionTypes.UPDATE_REPEAT_NEW_PASSWORD_VALUE:\r\n return {\r\n ...state,\r\n repeatNewPassword: action.newValue,\r\n };\r\n case actionTypes.CLEAR:\r\n return {\r\n ...initialState,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum BetalningsmedelTypes {\r\n Card,\r\n Autogiro,\r\n Avtalegiro,\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { updateAutogiroActionType as actionTypes } from './updateAutogiroActions';\r\n\r\nexport interface UpdateAutogiroState {\r\n id: string;\r\n clearingNumber: string;\r\n accountNumber: string;\r\n isClearingNumberValid: boolean;\r\n isAccountNumberValid: boolean;\r\n errorMessage: string;\r\n}\r\n\r\nconst initialState: UpdateAutogiroState = {\r\n id: '',\r\n clearingNumber: '',\r\n accountNumber: '',\r\n isClearingNumberValid: false,\r\n isAccountNumberValid: false,\r\n errorMessage: '',\r\n};\r\n\r\nexport const updateAutogiroReducer: Reducer = (\r\n state: UpdateAutogiroState = initialState,\r\n action: Action\r\n): UpdateAutogiroState => {\r\n switch (action.type) {\r\n case actionTypes.SET_CLEARING_NUMBER:\r\n return {\r\n ...state,\r\n clearingNumber: action.newValue,\r\n };\r\n case actionTypes.SET_ACCOUNT_NUMBER:\r\n return {\r\n ...state,\r\n accountNumber: action.newValue,\r\n };\r\n case actionTypes.SET_AUTOGIRO_TO_UPDATE:\r\n return {\r\n ...state,\r\n id: action.id,\r\n clearingNumber: action.currentClearingNumber,\r\n accountNumber: action.currentAccountNumber,\r\n };\r\n case actionTypes.SET_CLEARING_NUMBER_VALIDITY:\r\n return {\r\n ...state,\r\n isClearingNumberValid: action.isValid,\r\n };\r\n case actionTypes.SET_ACCOUNT_NUMBER_VALIDITY:\r\n return {\r\n ...state,\r\n isAccountNumberValid: action.isValid,\r\n };\r\n case actionTypes.SET_ERROR_MESSAGE:\r\n return {\r\n ...state,\r\n errorMessage: action.errorMessage,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { executedCommand, executingCommandFailed } from './../../global/fetch/fetchActions';\r\nimport { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { executingCommand, FetchCommandTypes } from 'store/global/fetch';\r\nimport { getAutogiro } from '../read/userReadActions';\r\nimport { updateAutogiroActions } from './updateAutogiroActions';\r\n\r\nexport const updateAutogiro = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (!state.global.session.activeFoerening) {\r\n return;\r\n }\r\n\r\n const activeFoereningId: number = state.global.session.activeFoerening;\r\n const requestBody: fos.api.UpdateAutogiroRequest = {\r\n FoereningId: activeFoereningId,\r\n Id: state.user.updateAutogiroCmd.id,\r\n ClearingNumber: state.user.updateAutogiroCmd.clearingNumber,\r\n BankAccountNumber: state.user.updateAutogiroCmd.accountNumber,\r\n };\r\n dispatch(executingCommand(state.user.updateAutogiroCmd.id, FetchCommandTypes.UPDATE_AUTOGIRO));\r\n return api\r\n .put('Betalningsmedel/UpdateAutogiro', requestBody, {\r\n muteErrorNotificationOnStatus: [400],\r\n })\r\n .then(res => {\r\n if (res.error) {\r\n dispatch(executingCommandFailed(state.user.updateAutogiroCmd.id, FetchCommandTypes.UPDATE_AUTOGIRO));\r\n if (res.result.http) {\r\n dispatch(updateAutogiroActions.setErrorMessage(res.result.http.response.status));\r\n }\r\n } else {\r\n dispatch(executedCommand(state.user.updateAutogiroCmd.id, FetchCommandTypes.UPDATE_AUTOGIRO));\r\n dispatch(getAutogiro(res.result.autogiro));\r\n }\r\n });\r\n};\r\n","import { combineReducers } from 'redux';\r\n\r\nimport { userReadReducer, UserReadState, UserReadAction } from './read';\r\nimport {\r\n updateUserProfileCmdReducer,\r\n UpdateUserProfileCmdState,\r\n UpdateUserProfileCmdActions,\r\n} from './updateUserProfileCmd';\r\nimport { createUserReducer, CreateUserAction, CreateUserState } from './createUserCmd';\r\nimport { changePasswordReducer, ChangePasswordAction, ChangePasswordState } from './changePasswordCmd';\r\nimport { updateAutogiroReducer, UpdateAutogiroAction, UpdateAutogiroState } from './updateAutogiroCmd';\r\n\r\nexport type UserAction =\r\n | UserReadAction\r\n | UpdateUserProfileCmdActions\r\n | CreateUserAction\r\n | ChangePasswordAction\r\n | UpdateAutogiroAction;\r\n\r\nexport interface UserRootState {\r\n read: UserReadState;\r\n write: UpdateUserProfileCmdState;\r\n createUserCmd: CreateUserState;\r\n changePasswordCmd: ChangePasswordState;\r\n updateAutogiroCmd: UpdateAutogiroState;\r\n}\r\n\r\nexport const userReducer = combineReducers({\r\n read: userReadReducer,\r\n write: updateUserProfileCmdReducer,\r\n createUserCmd: createUserReducer,\r\n changePasswordCmd: changePasswordReducer,\r\n updateAutogiroCmd: updateAutogiroReducer,\r\n});\r\n","import { api } from 'api';\r\nimport { ThunkAction, Dispatch, Action } from 'store';\r\nimport { updateUser } from 'store/user/updateUserProfileCmd';\r\nimport { getUser, getBetalningsmedel } from 'store/user/read';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from 'store/global/fetch';\r\nimport 'moment/locale/sv';\r\nimport 'moment/locale/nb';\r\nimport moment from 'moment';\r\nimport {\r\n updateFirstName,\r\n updateLastName,\r\n updateZipCode,\r\n updateStreet,\r\n updateCity,\r\n UpdateLookupStatus,\r\n} from './createUserCmd';\r\nimport { deleteCookie, addCookie } from 'websd/utils/cookie';\r\nimport { readToken, localStorage } from 'utils';\r\nimport { setFoereningExtraInfo } from 'store/global/session';\r\nimport { setInloggadeFoereningarInStorage } from 'store/auth';\r\nimport { BetalningsmedelTypes } from '.';\r\nimport { updateAutogiroAccountNumber, updateAutoGiroClearingNumber } from 'store/basket';\r\n\r\nexport const getProfileInfo = (FoereningId: number) => (dispatch: Dispatch) => {\r\n const promise = api.get('ProfileInfo/Get?foereningId=' + FoereningId, {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n dispatch(fetching(FoereningId, FetchStatusAggregateTypes.ANVAENDARE));\r\n promise.then(result => {\r\n if (!result.error) {\r\n let user: fos.api.User = result.result;\r\n dispatch(updateUser(user));\r\n dispatch(getUser(user));\r\n dispatch(fetched(FoereningId, FetchStatusAggregateTypes.ANVAENDARE, user));\r\n\r\n const authCookie: fos.api.TokenModel | null = readToken();\r\n if (!!authCookie) {\r\n const value =\r\n user.Email +\r\n ',' +\r\n authCookie.FoereningarLista.map(f => f.Namn + '(' + f.OnlinetraeningStatus + ')').join(',');\r\n deleteCookie('LID', '/', process.env.REACT_APP_FOS_DOMAIN);\r\n addCookie('LID', value, '/', process.env.REACT_APP_FOS_DOMAIN, moment(authCookie.Giltighetstid).toDate());\r\n }\r\n } else {\r\n dispatch(fetchedFailed(FoereningId, FetchStatusAggregateTypes.ANVAENDARE));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const getRegistreradeBetalningsmedel =\r\n (FoereningId: number): ThunkAction =>\r\n (dispatch: Dispatch) => {\r\n const promise = api.get(`Betalningsmedel//Get/${FoereningId}`, {\r\n // muteErrorNotificationOnStatus: [406]\r\n });\r\n dispatch(fetching(FoereningId, FetchStatusAggregateTypes.REGISTRERADE_BETALNINGS_MEDEL));\r\n promise.then(result => {\r\n if (!result.error) {\r\n let betalningsmedel: fos.api.Betalningsmedel = result.result;\r\n dispatch(getBetalningsmedel(betalningsmedel));\r\n dispatch(fetched(FoereningId, FetchStatusAggregateTypes.REGISTRERADE_BETALNINGS_MEDEL, result));\r\n if (betalningsmedel && betalningsmedel.AutogiroLista) {\r\n const autoGiroInfo = betalningsmedel.AutogiroLista.find(\r\n item => item.BetalningsmedelType === BetalningsmedelTypes.Autogiro\r\n );\r\n if (!!autoGiroInfo) {\r\n dispatch(updateAutogiroAccountNumber(autoGiroInfo.BankAccountNumber));\r\n dispatch(updateAutoGiroClearingNumber(autoGiroInfo.ClearingNumber));\r\n }\r\n }\r\n } else {\r\n dispatch(fetchedFailed(FoereningId, FetchStatusAggregateTypes.REGISTRERADE_BETALNINGS_MEDEL));\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const getExtraFoereningInformation =\r\n (foereningName: string): ThunkAction =>\r\n dispatch => {\r\n const promise = api.get(`Foerening/GetExtraInfo?foerening=${foereningName}`, {\r\n anonymousCall: true,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(setFoereningExtraInfo(result.result, foereningName));\r\n const inloggadeFoereningar = localStorage.getItem('INLOGGADE_FOERENING');\r\n if (!!inloggadeFoereningar && !!inloggadeFoereningar.value) {\r\n const f = inloggadeFoereningar.value.find(fo => fo.Namn === foereningName);\r\n if (!!f) {\r\n f.ExtraFoereningInfo = result.result;\r\n setInloggadeFoereningarInStorage(inloggadeFoereningar.value);\r\n }\r\n }\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const getPersonLookupAvailable = (foereningId: number) => (dispatch: Dispatch) => {\r\n const promise = api.get('Anvaendare/GetPersonLookupAvailable?foereningId=' + foereningId);\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP_AVAILABLE));\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(UpdateLookupStatus(result.result ? 1 : 0));\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP_AVAILABLE, result.result));\r\n } else {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP_AVAILABLE));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const getPersonLookup = (foereningId: number, ssn: string) => (dispatch: Dispatch) => {\r\n dispatch(UpdateLookupStatus(1));\r\n const promise = api.get(`Anvaendare/GetPersonLookup?foereningId=${foereningId}&ssn=${ssn}`);\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP));\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(UpdateLookupStatus(result.result.Status));\r\n if (!!result.result.Data) {\r\n dispatch(updateFirstName(result.result.Data.Foernamn));\r\n dispatch(updateLastName(result.result.Data.Efternamn));\r\n dispatch(updateZipCode(result.result.Data.Postnummer));\r\n dispatch(updateStreet(result.result.Data.Gata));\r\n dispatch(updateCity(result.result.Data.Stad));\r\n }\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP, result.result));\r\n } else {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.GET_PERSON_LOOKUP));\r\n }\r\n });\r\n return promise;\r\n};\r\n","import { ThunkAction } from 'store/rootReducer';\r\nimport { api } from 'api';\r\nimport { getNews } from '.';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from 'store/global/fetch';\r\nimport { constructSafeName } from 'utils';\r\n\r\nexport const fetchNews = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const activeFoerening = state.global.session.activeFoerening;\r\n const inloggadeFoereningar = state.global.session.inloggadeFoereningar;\r\n const userId = state.global.session.userId;\r\n\r\n if (!userId) {\r\n return;\r\n }\r\n if (!activeFoerening || !inloggadeFoereningar || inloggadeFoereningar.length < 1) {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.NEWS));\r\n return;\r\n }\r\n const foerening = state.global.session.inloggadeFoereningar.find(\r\n info => info.Id.toString() === activeFoerening.toString()\r\n );\r\n\r\n if (!foerening) {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.NEWS));\r\n return;\r\n }\r\n\r\n const foereningName = foerening.Namn;\r\n dispatch(fetching(userId, FetchStatusAggregateTypes.NEWS));\r\n const promise = api.get>(\r\n `Nyhet/Nyheter?userId=${userId}&foereningName=${constructSafeName(foereningName)}`\r\n );\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(fetched(userId, FetchStatusAggregateTypes.NEWS, result));\r\n dispatch(getNews(result.result));\r\n } else {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.NEWS));\r\n }\r\n });\r\n};\r\n","export enum LanguageActionTypes {\r\n SET_LANGUAGE = 'UI/LANGUAGE/SET_LANGUAGE',\r\n}\r\n\r\nexport type SetLanguageAction = {\r\n type: LanguageActionTypes.SET_LANGUAGE;\r\n language: fos.api.Language;\r\n};\r\n\r\nexport const setLanguage = (language: fos.api.Language): SetLanguageAction => ({\r\n type: LanguageActionTypes.SET_LANGUAGE,\r\n language,\r\n});\r\n\r\nexport type UILanguageActions = SetLanguageAction;\r\n","import { Reducer } from 'redux';\r\nimport { LanguageActionTypes } from '.';\r\nimport { Action } from 'store';\r\n\r\nexport interface LanguageUiState {\r\n readonly id: number;\r\n readonly name: string;\r\n readonly code: string;\r\n}\r\n\r\nconst initialState: LanguageUiState = {\r\n id: 1,\r\n name: 'Svenska',\r\n code: 'sv-SE',\r\n};\r\n\r\nexport const languageUiReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case LanguageActionTypes.SET_LANGUAGE:\r\n return {\r\n ...state,\r\n id: action.language.LanguageId,\r\n name: action.language.LanguageName,\r\n code: action.language.LanguageCode,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum ActionType {\r\n errorFetch = 'debug/errorFetch',\r\n errorFetched = 'debug/errorFetched',\r\n errorFetchedFailed = 'debug/errorFetchedFailed',\r\n}\r\n\r\ninterface DebugErrorFetchAction {\r\n type: ActionType.errorFetch;\r\n}\r\n\r\ninterface DebugErrorFetchedAction {\r\n type: ActionType.errorFetched;\r\n}\r\n\r\ninterface DebugErrorFetchedFailedAction {\r\n type: ActionType.errorFetchedFailed;\r\n}\r\n\r\nexport type DebugAction = DebugErrorFetchAction | DebugErrorFetchedAction | DebugErrorFetchedFailedAction;\r\n\r\nexport const debugErrorFetch = (): DebugErrorFetchAction => ({\r\n type: ActionType.errorFetch,\r\n});\r\n\r\nexport const debugErrorFetched = (): DebugErrorFetchedAction => ({\r\n type: ActionType.errorFetched,\r\n});\r\n\r\nexport const debugErrorFetchedFailed = (): DebugErrorFetchedFailedAction => ({\r\n type: ActionType.errorFetchedFailed,\r\n});\r\n","import { setLanguage } from './languageActions';\r\nimport { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { getLanguageCode } from 'store/user/read';\r\nimport moment from 'moment';\r\n\r\nexport const setupTranslation = (): ThunkAction => (dispatch, getState) => {\r\n const promise = api.get(`Settings/LanguageSettings`, {\r\n anonymousCall: true,\r\n muteErrorNotificationOnStatus: [401],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(setLanguage(result.result));\r\n\r\n const code = result.result.LanguageCode.substring(0, 2);\r\n dispatch(getLanguageCode(code));\r\n moment.locale(code);\r\n } else {\r\n // Fallback till svenska\r\n dispatch(getLanguageCode('sv'));\r\n moment.locale('sv');\r\n }\r\n });\r\n return promise;\r\n};\r\n","import { api } from '../../../api';\r\nimport { updateBasket, showCouponMessage, updateOrderAction, showMembershipMessage } from 'store/basket';\r\nimport { store } from 'index';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { fetchProducts, ProductTypes } from 'store/shop';\r\nimport {\r\n fetching,\r\n FetchStatusAggregateTypes,\r\n fetched,\r\n fetchedFailed,\r\n executingCommand,\r\n FetchCommandTypes,\r\n executedCommand,\r\n executingCommandFailed,\r\n} from 'store/global/fetch';\r\nimport { setOrderId } from 'store/global/session/sessionActions';\r\n\r\nconst ORDER_STORAGE_PREFIX = 'ORDER::';\r\n\r\nexport const getOrder = (foereningId: number, orderId: number) => {\r\n store.dispatch(fetching(orderId, FetchStatusAggregateTypes.GET_ORDER));\r\n const promise = api.get('Order/GetOrder?orderId=' + orderId + '&foereningId=' + foereningId);\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(fetched(orderId, FetchStatusAggregateTypes.GET_ORDER, result.result));\r\n store.dispatch(updateOrderAction(result.result));\r\n if (!!result.result) {\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id, false);\r\n }\r\n } else {\r\n store.dispatch(fetchedFailed(orderId, FetchStatusAggregateTypes.GET_ORDER));\r\n }\r\n });\r\n};\r\n\r\nexport const setUserOnOrder = (foereningId: number) => {\r\n const orderId = localStorage.getItem(ORDER_STORAGE_PREFIX + foereningId);\r\n if (!orderId) {\r\n return;\r\n }\r\n store.dispatch(executingCommand(orderId, FetchCommandTypes.SET_USER_ON_ORDER));\r\n const promise = api.put('Order/SetUserOnOrder', {\r\n FoereningId: foereningId,\r\n OrderId: orderId,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand(orderId, FetchCommandTypes.SET_USER_ON_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id, false);\r\n } else {\r\n store.dispatch(executingCommandFailed(orderId, FetchCommandTypes.SET_USER_ON_ORDER));\r\n }\r\n });\r\n};\r\n\r\nexport const createOrder = (foereningId: number, products: fos.api.Product[]) => {\r\n store.dispatch(executingCommand('' + foereningId, FetchCommandTypes.CREATE_ORDER));\r\n const filteredProducts = products.filter(p => p.Types.indexOf(ProductTypes.Medlemskap) === -1); // Remove medlemskap as a product\r\n const promise = api.post('Order/CreateOrder', {\r\n FoereningId: foereningId,\r\n Products: filteredProducts.length > 0 ? filteredProducts : products, // Skicka inte den filtrerade listan om orginallistan endast innehåller medlemskap\r\n });\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand('' + foereningId, FetchCommandTypes.CREATE_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id, false);\r\n localStorage.setItem(ORDER_STORAGE_PREFIX + foereningId, result.result.id.toString());\r\n store.dispatch(setOrderId(result.result.id));\r\n } else {\r\n store.dispatch(executingCommandFailed('' + foereningId, FetchCommandTypes.CREATE_ORDER));\r\n }\r\n });\r\n};\r\n\r\nexport const deleteOrder = (foereningId: number, orderId: number) => {\r\n api.post('Order/DeleteOrder', {\r\n OrderId: orderId,\r\n FoereningId: foereningId,\r\n Products: [],\r\n });\r\n localStorage.removeItem(ORDER_STORAGE_PREFIX + foereningId);\r\n store.dispatch(setOrderId(undefined));\r\n};\r\n\r\nexport const addProductToOrder = (foereningId: number, orderId: number, product: fos.api.Product) => {\r\n store.dispatch(executingCommand('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n const promise = api.post('Order/AddProduct', {\r\n FoereningId: foereningId,\r\n OrderId: orderId,\r\n Product: product,\r\n });\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id);\r\n } else {\r\n store.dispatch(executingCommandFailed('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n }\r\n });\r\n};\r\n\r\nexport const addCoupon = (foereningId: number, orderId: number, code: string) => {\r\n store.dispatch(executingCommand('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n const promise = api.post(\r\n 'Order/AddCoupon',\r\n {\r\n Code: code,\r\n OrderId: orderId,\r\n FoereningId: foereningId,\r\n },\r\n { muteErrorNotificationOnStatus: [403] }\r\n );\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id);\r\n } else if (!!result.result.http && !!result.result.http.response) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n store.dispatch(updateOrderAction(result.result.http.response));\r\n mapOrderToBasket(\r\n foereningId,\r\n result.result.http.response.subscriptionItems,\r\n result.result.http.response.customerType.id\r\n );\r\n store.dispatch(showCouponMessage(true));\r\n } else {\r\n store.dispatch(executingCommandFailed('' + orderId, FetchCommandTypes.ADD_TO_ORDER));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const removeSubscription = (foereningId: number, orderId: number, productId: number) => {\r\n store.dispatch(executingCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n const order = store.getState().shoppingBasket.order;\r\n const subscription = order\r\n ? order.subscriptionItems.find(s => s.product.id.toString() === productId.toString())\r\n : undefined;\r\n const promise = api.post('Order/RemoveSubscription', {\r\n FoereningId: foereningId,\r\n OrderId: orderId,\r\n ProductId: productId,\r\n SubscriptionId: subscription ? subscription.subscriptionId : undefined,\r\n });\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id);\r\n } else if (!!result.result.http && !!result.result.http.response) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n store.dispatch(updateOrderAction(result.result.http.response));\r\n mapOrderToBasket(\r\n foereningId,\r\n result.result.http.response.subscriptionItems,\r\n result.result.http.response.customerType.id\r\n );\r\n } else {\r\n store.dispatch(executingCommandFailed('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n }\r\n });\r\n};\r\n\r\nexport const removeCoupon = (foereningId: number, orderId: number, couponCode: string) => {\r\n store.dispatch(executingCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n const promise = api.post('Order/RemoveCoupon', {\r\n FoereningId: foereningId,\r\n OrderId: orderId,\r\n Code: couponCode,\r\n });\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n store.dispatch(updateOrderAction(result.result));\r\n mapOrderToBasket(foereningId, result.result.subscriptionItems, result.result.customerType.id);\r\n } else if (!!result.result.http && !!result.result.http.response) {\r\n store.dispatch(executedCommand('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n store.dispatch(updateOrderAction(result.result.http.response));\r\n mapOrderToBasket(\r\n foereningId,\r\n result.result.http.response.subscriptionItems,\r\n result.result.http.response.customerType.id\r\n );\r\n } else {\r\n store.dispatch(executingCommandFailed('' + orderId, FetchCommandTypes.REMOVE_FROM_ORDER));\r\n }\r\n });\r\n};\r\n\r\nconst doUpdateBasket = (\r\n subscriptionItems: fos.api.SubscriptionItem[],\r\n foereningId: number,\r\n products: fos.api.Product[],\r\n customerType: number,\r\n checkMembershipMessage: boolean\r\n) => {\r\n const parsedProducts = subscriptionItemsToProducts(subscriptionItems, products, customerType);\r\n if (checkMembershipMessage) {\r\n const currentMedlemskap = store\r\n .getState()\r\n .shoppingBasket.products.filter(p => p.Types.some(t => t === ProductTypes.Medlemskap)).length;\r\n const newMedlemskap = parsedProducts.filter(p => p.Types.some(t => t === ProductTypes.Medlemskap)).length;\r\n if (currentMedlemskap < newMedlemskap) {\r\n store.dispatch(showMembershipMessage(true));\r\n }\r\n }\r\n store.dispatch(updateBasket(foereningId, parsedProducts));\r\n};\r\n\r\nconst subscriptionItemsToProducts = (\r\n subscriptionItems: fos.api.SubscriptionItem[],\r\n products: fos.api.Product[],\r\n customerType: number\r\n) => {\r\n if (!subscriptionItems) {\r\n return products;\r\n }\r\n return subscriptionItems.map(s => {\r\n const filteredProducts = products.filter(p => {\r\n return '' + p.Id === '' + s.product.id; // p.Id is string for some reason????\r\n });\r\n if (filteredProducts.length === 1) {\r\n const product = filteredProducts[0];\r\n product.Pris = s.price.amount / 100;\r\n return product;\r\n } else if (filteredProducts.length > 1) {\r\n const product = filteredProducts.find(p => '' + p.CustomerType.Id === '' + customerType);\r\n if (!!product) {\r\n product.Pris = s.price.amount / 100;\r\n return product;\r\n }\r\n }\r\n return products[0];\r\n });\r\n};\r\n\r\nconst getProducts = (foereningId: number): Promise> => {\r\n const url = 'produkter/getproduktlist?foereningId=';\r\n return api.get>(url + foereningId, {\r\n muteErrorNotificationOnStatus: [400],\r\n });\r\n};\r\n\r\nconst mapOrderToBasket = (\r\n foereningId: number,\r\n subscriptionItems: fos.api.SubscriptionItem[],\r\n customerType: number,\r\n checkMembershipMessage: boolean = true\r\n) => {\r\n const cachedProducts = store.getState().product.unfilteredProducts;\r\n if (cachedProducts.length === 0) {\r\n getProducts(foereningId).then(result2 => {\r\n if (!result2.error) {\r\n doUpdateBasket(subscriptionItems, foereningId, result2.result, customerType, checkMembershipMessage);\r\n store.dispatch(fetchProducts(result2.result));\r\n }\r\n });\r\n } else {\r\n doUpdateBasket(subscriptionItems, foereningId, cachedProducts, customerType, checkMembershipMessage);\r\n }\r\n};\r\n","import {\r\n toogleFoereningSwitcher,\r\n isSwitchingFoereningSwitcher,\r\n} from 'store/global/ui/foereningSwitcher/foereningSwitcherActions';\r\nimport { sitecoreUtils } from 'utils/sitecoreIntegration';\r\nimport { updatePassword } from './loginCmd/loginCmdActions';\r\nimport { bokaPassFromSitecore, fetchPassListInForeground } from 'store/pass/passThunks';\r\nimport { ThunkAction } from 'store';\r\nimport moment from 'moment';\r\nimport { AuthReadActions, clearAuthToken, setAuthToken } from 'store/auth/read';\r\nimport { ChangeLocationAction, switchView, redirectTo, LocationActionTypes, getIsPublicWebMode } from 'store/location';\r\nimport { createBasket, BasketActions } from 'store/basket';\r\nimport { setActiveFoerening, setInloggadeFoereningar, SessionActions, setUserId } from 'store/global/session';\r\nimport {\r\n clearSavedAuth,\r\n hasAValidAuthToken,\r\n readToken,\r\n localStorage,\r\n hasAValidRefreshToken,\r\n getRefreshToken,\r\n} from 'utils';\r\nimport { api } from 'api';\r\nimport { getProfileInfo, getExtraFoereningInformation } from '../user';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { clearLoginCmd, updateEmail } from './loginCmd';\r\nimport { executingCommand, FetchCommandTypes, executingCommandFailed, executedCommand } from 'store/global/fetch';\r\nimport { getBookingsInForeground } from 'store/bokningar';\r\nimport { deleteCookie } from 'websd/utils/cookie';\r\nimport { fetchNews } from 'store/news';\r\nimport { setupTranslation } from 'store/global/ui/language';\r\nimport { setUserOnOrder } from 'components/shop/Order/Order';\r\nimport { getCalendarSync } from 'store/global/calendar';\r\nimport { RootState } from 'store/rootReducer';\r\n\r\nexport type AuthAction = ChangeLocationAction | SessionActions | BasketActions | AuthReadActions;\r\n\r\nconst STORED_AUTH_NAME: string = process.env.REACT_APP_AUTH_COOKIE as string;\r\nconst FOS_URL: string = process.env.REACT_APP_FOS_URL as string;\r\nconst INLOGGADE_FOERENINGAR_STORAGE_KEY: string = 'INLOGGADE_FOERENING';\r\nconst LANGUAGE_STORAGE_KEY: string = 'LANGUAGE';\r\nconst LAST_KNOWN_FOERENING_STORAGE_KEY: string = 'LAST_KNOWN_FOERENING';\r\n\r\nexport const logout =\r\n (goToLogin: boolean = true, shouldRedirectToPublicWeb: boolean = false): ThunkAction =>\r\n (dispatch, getState) => {\r\n clearSavedAuth();\r\n dispatch(clearAuthToken());\r\n clearLoginId();\r\n if (shouldRedirectToPublicWeb) {\r\n dispatch(redirectToPublicWeb());\r\n } else {\r\n if (goToLogin) {\r\n dispatch(switchView(LocationActionTypes.Login, getState().location.query));\r\n }\r\n }\r\n return null;\r\n };\r\n\r\nexport const getActiveFoereningUrl = (state: RootState): string => {\r\n const foereningId = state.global.session.activeFoerening;\r\n let foerening: fos.api.InloggadeFoerening | undefined;\r\n if (foereningId) {\r\n foerening = state.global.session.inloggadeFoereningar.find(x => x.Id.toString() === foereningId.toString());\r\n }\r\n let url = FOS_URL;\r\n if (!!foerening && !!foerening.ExtraFoereningInfo) {\r\n url = foerening.ExtraFoereningInfo.ExternalUrl;\r\n }\r\n return url;\r\n};\r\n\r\nexport const redirectToPublicWeb = (): ThunkAction => (dispatch, getState) => {\r\n const url = getActiveFoereningUrl(getState());\r\n window.open(url, '_self');\r\n};\r\n\r\nexport const goToPublicWeb = (): ThunkAction => (dispatch, getState) => {\r\n const url = getActiveFoereningUrl(getState());\r\n window.open(url, '_blank');\r\n};\r\n\r\nexport const clearLoginId = () => {\r\n deleteCookie('LID', '/', process.env.REACT_APP_FOS_DOMAIN);\r\n};\r\n\r\nexport const login =\r\n (credentials: fos.api.Credentials): ThunkAction =>\r\n (dispatch, getState) => {\r\n localStorage.removeItem(STORED_AUTH_NAME);\r\n dispatch(executingCommand(credentials.Username, FetchCommandTypes.LOGIN));\r\n const promise = api.post('Anvaendare/Login/', credentials, {\r\n anonymousCall: true,\r\n muteErrorNotificationOnStatus: [401],\r\n });\r\n promise.then(res => {\r\n if (!res.error) {\r\n dispatch(executedCommand(credentials.Username, FetchCommandTypes.LOGIN));\r\n dispatch(authenticateAndSetupUser(res.result, credentials.LanguageId));\r\n // TODO ouyo Get the currency\r\n dispatch(createBasket(res.result.AktivFoereningId, 'SEK'));\r\n } else {\r\n // TODO handle error messages for different errors\r\n dispatch(executingCommandFailed(credentials.Username, FetchCommandTypes.LOGIN));\r\n }\r\n });\r\n\r\n return promise;\r\n };\r\n\r\nexport const refreshToken =\r\n (token: string, foereningId: number): ThunkAction =>\r\n (dispatch, getState) => {\r\n // tslint:disable-next-line: no-any\r\n const promise = api.post('Anvaendare/RefreshLogin/', {\r\n RefreshToken: token,\r\n FoereningId: foereningId,\r\n });\r\n\r\n promise.then(res => {\r\n if (!res.error) {\r\n setAuthTokenInStorage(res.result);\r\n }\r\n });\r\n\r\n return promise;\r\n };\r\n\r\nexport const loginToNewFoerening =\r\n (foereningId: number): ThunkAction =>\r\n (dispatch, getState) => {\r\n const promise = api.get(`Anvaendare/LoginToNewFoerening?foereningId=${foereningId}`, {\r\n muteErrorNotificationOnStatus: [401],\r\n });\r\n promise.then(res => {\r\n if (!res.error) {\r\n localStorage.saveItem(LAST_KNOWN_FOERENING_STORAGE_KEY, res.result.AktivFoereningId);\r\n dispatch(updateAuthenticationAndUserSetup(res.result));\r\n // TODO ouyo Get the currency\r\n dispatch(createBasket(res.result.AktivFoereningId, 'SEK'));\r\n }\r\n return res;\r\n });\r\n return promise;\r\n };\r\n\r\nconst setAuthTokenInStorage = (token: fos.api.TokenModel) => {\r\n localStorage.saveItem(STORED_AUTH_NAME, token, moment(token.Giltighetstid).toDate());\r\n};\r\n\r\nexport const setInloggadeFoereningarInStorage = (\r\n inloggadeFoereningar: fos.api.InloggadeFoerening[],\r\n expirationDate?: string\r\n) => {\r\n localStorage.saveItem(\r\n INLOGGADE_FOERENINGAR_STORAGE_KEY,\r\n inloggadeFoereningar,\r\n expirationDate ? moment(expirationDate).toDate() : undefined\r\n );\r\n};\r\n\r\nconst setLanguageInStorage = (languageId: number) => {\r\n localStorage.saveItem(LANGUAGE_STORAGE_KEY, languageId);\r\n};\r\n\r\nexport const authenticateAndSetupUser =\r\n (token: fos.api.TokenModel, languageId: number): ThunkAction =>\r\n (dispatch, getState) => {\r\n // const state = getState();\r\n setAuthTokenInStorage(token);\r\n // I app läget vill vi att spara foereningar för längre tid då kan man hämta dem vid auto-inloggning\r\n setInloggadeFoereningarInStorage(\r\n token.FoereningarLista,\r\n token.Giltighetstid\r\n // !state.global.session.appMode ?\r\n // token.Giltighetstid :\r\n // undefined\r\n );\r\n setLanguageInStorage(languageId);\r\n dispatch(setAuthToken(token.Token, token.Giltighetstid));\r\n dispatch(setActiveFoerening(token.AktivFoereningId));\r\n dispatch(setInloggadeFoereningar(token.FoereningarLista));\r\n dispatch(setUserId(token.AnvaendarId));\r\n dispatch(setupTranslation());\r\n dispatch(getCalendarSync(token.AnvaendarId));\r\n setUserOnOrder(token.AktivFoereningId);\r\n localStorage.saveItem(LAST_KNOWN_FOERENING_STORAGE_KEY, token.AktivFoereningId);\r\n dispatch(clearLoginCmd());\r\n const foerening = token.FoereningarLista.find(f => '' + f.Id === '' + token.AktivFoereningId);\r\n if (!!foerening) {\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n }\r\n return null;\r\n };\r\n\r\nexport const updateAuthenticationAndUserSetup =\r\n (token: fos.api.TokenModel): ThunkAction =>\r\n (dispatch, getState) => {\r\n // const state = getState();\r\n setAuthTokenInStorage(token);\r\n // I app läget vill vi att spara foereningar för längre tid då kan man hämta dem vid auto-inloggning\r\n setInloggadeFoereningarInStorage(\r\n token.FoereningarLista,\r\n token.Giltighetstid\r\n // !state.global.session.appMode ?\r\n // token.Giltighetstid :\r\n // undefined\r\n );\r\n dispatch(setAuthToken(token.Token, token.Giltighetstid));\r\n dispatch(setActiveFoerening(token.AktivFoereningId));\r\n dispatch(setInloggadeFoereningar(token.FoereningarLista));\r\n dispatch(setUserId(token.AnvaendarId));\r\n const foerening = token.FoereningarLista.find(f => '' + f.Id === '' + token.AktivFoereningId);\r\n if (!!foerening) {\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n }\r\n return null;\r\n };\r\n\r\nexport const loginWithCreds =\r\n (credentials: fos.api.Credentials): ThunkAction =>\r\n (dispatch, getState) => {\r\n const hasFirstVisitSet = !!localStorage.getItem('firstvisit') || !!localStorage.getItem('firstVisit');\r\n if (!hasFirstVisitSet) {\r\n localStorage.saveItem('firstVisit', true);\r\n }\r\n const promise = dispatch>>(login(credentials));\r\n promise.then(res => {\r\n if (!res.error) {\r\n if (sitecoreUtils.isIframedInSitecore()) {\r\n sitecoreUtils.onLoginSignal();\r\n } else {\r\n const state = getState();\r\n if (state.location.type === LocationActionTypes.Login) {\r\n dispatch(redirectTo(LocationActionTypes.Home));\r\n } else if (state.location.type === LocationActionTypes.AdminLogin) {\r\n dispatch(redirectTo(LocationActionTypes.Home));\r\n } else if (\r\n state.location.type === LocationActionTypes.PublicShop ||\r\n state.location.type === LocationActionTypes.Shop\r\n ) {\r\n dispatch(redirectTo(LocationActionTypes.ShoppingBasket));\r\n } else if (\r\n state.location.type === LocationActionTypes.PublicShoppingBasket ||\r\n state.location.type === LocationActionTypes.ShoppingBasket\r\n ) {\r\n dispatch(redirectTo(LocationActionTypes.ShoppingBasket));\r\n } else if (\r\n state.location.type === LocationActionTypes.ProductDetails ||\r\n state.location.type === LocationActionTypes.PublicProductDetails\r\n ) {\r\n dispatch(redirectTo(LocationActionTypes.ShoppingBasket));\r\n } else if (\r\n state.location.type === LocationActionTypes.AdminProductDetails ||\r\n state.location.type === LocationActionTypes.AdminShop ||\r\n state.location.type === LocationActionTypes.AdminShoppingBasket ||\r\n state.location.type === LocationActionTypes.AdminRegister\r\n ) {\r\n dispatch(redirectTo(LocationActionTypes.AdminShoppingBasket));\r\n } else {\r\n dispatch(redirectTo(LocationActionTypes.Home));\r\n }\r\n }\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const loginFromShop =\r\n (credentials: fos.api.Credentials): ThunkAction =>\r\n dispatch => {\r\n const promise = dispatch>>(login(credentials));\r\n promise.then(res => {\r\n if (!res.error) {\r\n dispatch(getProfileInfo(credentials.FoereningId));\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const loginFromSchedule =\r\n (credentials: fos.api.Credentials, passId: number | string, bokaKoePlats: boolean): ThunkAction =>\r\n dispatch => {\r\n const promise = dispatch>>(login(credentials));\r\n promise.then(res => {\r\n if (!res.error) {\r\n dispatch(bokaPassFromSitecore({ passId: passId, foereningsId: credentials.FoereningId }, bokaKoePlats));\r\n dispatch(getBookingsInForeground());\r\n window.parent.postMessage('authenticated', process.env.REACT_APP_FOS_URL as string);\r\n } else {\r\n dispatch(updateEmail(''));\r\n dispatch(updatePassword(''));\r\n }\r\n });\r\n return promise;\r\n };\r\n\r\nexport const checkAuthStatus = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (hasAValidAuthToken()) {\r\n const authCookie: fos.api.TokenModel | null = readToken();\r\n if (authCookie == null) {\r\n dispatch(logout());\r\n } else {\r\n dispatch(setAuthToken(authCookie.Token, authCookie.Giltighetstid));\r\n const activeFoerening = localStorage.getItem(LAST_KNOWN_FOERENING_STORAGE_KEY);\r\n if (activeFoerening && activeFoerening.value) {\r\n dispatch(setActiveFoerening(activeFoerening.value));\r\n dispatch(createBasket(activeFoerening.value, 'SEK'));\r\n }\r\n\r\n const inloggadeFoereningar = localStorage.getItem(\r\n INLOGGADE_FOERENINGAR_STORAGE_KEY\r\n );\r\n if (inloggadeFoereningar && inloggadeFoereningar.value) {\r\n dispatch(setInloggadeFoereningar(inloggadeFoereningar.value));\r\n }\r\n dispatch(setUserId(authCookie.AnvaendarId));\r\n dispatch(setupTranslation());\r\n const foerening = authCookie.FoereningarLista.find(f => '' + f.Id === '' + authCookie.AktivFoereningId);\r\n if (!!foerening) {\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n }\r\n if (state.location.type === LocationActionTypes.Login || state.location.type === LocationActionTypes.AdminLogin) {\r\n dispatch(redirectTo(LocationActionTypes.Home));\r\n }\r\n dispatch(getCalendarSync(authCookie.AnvaendarId));\r\n }\r\n } else if (hasAValidRefreshToken()) {\r\n const activeFoerening = localStorage.getItem(LAST_KNOWN_FOERENING_STORAGE_KEY);\r\n if (activeFoerening !== null && activeFoerening.value !== null) {\r\n dispatch>>(\r\n refreshToken(getRefreshToken(), activeFoerening.value)\r\n ).then(() => {\r\n if (hasAValidAuthToken()) {\r\n dispatch(checkAuthStatus());\r\n } else {\r\n dispatch(logout());\r\n }\r\n });\r\n }\r\n } else if (\r\n state.location.type === LocationActionTypes.Reset ||\r\n state.location.type === LocationActionTypes.ResetPassword ||\r\n getIsPublicWebMode(state.location)\r\n ) {\r\n dispatch(clearAuthToken());\r\n dispatch(setupTranslation());\r\n } else {\r\n dispatch(logout());\r\n }\r\n};\r\n\r\nconst switchToFoerening =\r\n (foerening: fos.api.InloggadeFoerening): ThunkAction =>\r\n (dispatch, getState) => {\r\n dispatch(setActiveFoerening(foerening.Id));\r\n dispatch(createBasket(foerening.Id, 'SEK'));\r\n dispatch(toogleFoereningSwitcher(false));\r\n dispatch(getProfileInfo(foerening.Id));\r\n dispatch(getBookingsInForeground());\r\n dispatch(fetchPassListInForeground(foerening.Id));\r\n dispatch(fetchNews());\r\n dispatch(switchView());\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n };\r\n\r\nexport const updateActiveFoerening =\r\n (foerening: fos.api.InloggadeFoerening): ThunkAction =>\r\n (dispatch, getState) => {\r\n dispatch(isSwitchingFoereningSwitcher(true));\r\n const state = getState();\r\n if (state.global.session.inloggadeFoereningar.find(f => f.Id.toString() === foerening.Id.toString())) {\r\n dispatch(switchToFoerening(foerening));\r\n dispatch(isSwitchingFoereningSwitcher(false));\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n } else {\r\n dispatch(getExtraFoereningInformation(foerening.Namn));\r\n dispatch>>(loginToNewFoerening(foerening.Id))\r\n .then(res => {\r\n if (res && !res.error) {\r\n dispatch(switchToFoerening(foerening));\r\n }\r\n dispatch(isSwitchingFoereningSwitcher(false));\r\n })\r\n .catch(() => dispatch(isSwitchingFoereningSwitcher(false)));\r\n }\r\n };\r\n","import { configureApi } from './websd/utils/configureApi';\r\nimport { addError } from './store/global/errors';\r\nimport { store } from './index';\r\nimport { checkAuthStatus } from 'store/auth';\r\n\r\nconst apiURL = process.env.REACT_APP_API_URL as string;\r\n\r\nexport const api = configureApi({\r\n apiRootEndpoint: apiURL,\r\n unauthorizedAction: errorMessage => {\r\n store.dispatch(checkAuthStatus());\r\n store.dispatch(addError(errorMessage));\r\n },\r\n errorActionCreator: errorMessage => store.dispatch(addError(errorMessage)),\r\n});\r\n","import * as ErrorStackParser from 'error-stack-parser';\r\nimport { api } from 'api';\r\nimport { Dispatch } from 'store';\r\nimport { ErrorsAction, appCrashed } from './errorsActions';\r\nimport { ErrorReport } from './errorsModels';\r\n\r\nexport const sendErrorReport = (error: Error) => (dispatch: Dispatch) => {\r\n dispatch(appCrashed(error));\r\n\r\n const errorReport: ErrorReport = {\r\n message: error.message,\r\n stackframes: ErrorStackParser.parse(error),\r\n };\r\n\r\n api.post('LogClient/Error', errorReport, { anonymousCall: true }).then(response => {\r\n if (response.error) {\r\n // tslint:disable-next-line:no-console\r\n console.warn('Could not send error report', response.result);\r\n }\r\n });\r\n};\r\n","export enum BookingRulesActionTypes {\r\n SET_FOCUS_ON_FOEREING = 'SET_FOCUS_ON_FOEREING',\r\n}\r\nexport interface SetFocusOnFoerening {\r\n type: BookingRulesActionTypes.SET_FOCUS_ON_FOEREING;\r\n id: number;\r\n}\r\n\r\nexport const setFocusOnFoerening = (id: number) => ({\r\n type: BookingRulesActionTypes.SET_FOCUS_ON_FOEREING,\r\n id,\r\n});\r\n\r\nexport type BookingRulesActions = SetFocusOnFoerening;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport {\r\n UIScheduleActionType,\r\n SetScrollToDayAction,\r\n UIScheduleSetSelectedPass,\r\n UIScheduleSetShouldDisableSticky,\r\n UISetClickedFromDayPickerAction,\r\n UISetDayClickedFromDayPickerAction,\r\n UIScheduleSetScrollPosition,\r\n} from './uiScheduleActions';\r\n\r\nexport interface UIScheduleState {\r\n scrollToDay: string;\r\n viewShowing: UIScheduleViewType;\r\n selectedPass?: fos.api.Pass;\r\n shouldDisableSticky: boolean;\r\n clickFromDayPicker: boolean;\r\n clickFromDayPickerDay: string;\r\n scrollTop: number;\r\n scrollBottom: number;\r\n scrollRightPercent: number;\r\n}\r\n\r\nexport enum UIScheduleViewType {\r\n 'LISTVIEW' = 'LISTVIEW',\r\n 'WEEKVIEW' = 'WEEKVIEW',\r\n}\r\n\r\nexport const setScrollToDay = (day: string): SetScrollToDayAction => ({\r\n type: UIScheduleActionType.SetScrollToDay,\r\n scrollToDay: day,\r\n});\r\n\r\nexport const setClickedFromDayPicker = (clickFromDayPicker: boolean): UISetClickedFromDayPickerAction => ({\r\n type: UIScheduleActionType.SetClickedFromDayPicker,\r\n clickFromDayPicker,\r\n});\r\n\r\nexport const setDayClickedFromDayPicker = (clickFromDayPickerDay: string): UISetDayClickedFromDayPickerAction => ({\r\n type: UIScheduleActionType.SetDayClickedFromDayPicker,\r\n clickFromDayPickerDay,\r\n});\r\n\r\nconst initialState: UIScheduleState = {\r\n scrollToDay: '',\r\n shouldDisableSticky: false,\r\n viewShowing: UIScheduleViewType.LISTVIEW,\r\n clickFromDayPicker: false,\r\n clickFromDayPickerDay: '',\r\n scrollTop: 0,\r\n scrollBottom: -1,\r\n scrollRightPercent: 0,\r\n};\r\n\r\nexport const getScheduleHasWeekView = (scheduleUIState: UIScheduleState): boolean => {\r\n return scheduleUIState.viewShowing === UIScheduleViewType.WEEKVIEW;\r\n};\r\n\r\nexport const setSelectedPass = (selectedPass: fos.api.Pass): UIScheduleSetSelectedPass => ({\r\n type: UIScheduleActionType.SetSelectedPass,\r\n selectedPass: selectedPass,\r\n});\r\n\r\nexport const setShouldDisableSticky = (shouldBeSticky: boolean): UIScheduleSetShouldDisableSticky => ({\r\n type: UIScheduleActionType.SetShouldDisableSticky,\r\n value: shouldBeSticky,\r\n});\r\n\r\nexport const setScheduleScrollPosition = (\r\n scrollTop: number,\r\n scrollBottom: number,\r\n scrollRightPercent: number\r\n): UIScheduleSetScrollPosition => ({\r\n type: UIScheduleActionType.SetScrollPosition,\r\n scrollTop,\r\n scrollBottom,\r\n scrollRightPercent,\r\n});\r\n\r\nexport const scheduleUiReducer: Reducer = (state = initialState, action: Action): UIScheduleState => {\r\n switch (action.type) {\r\n case UIScheduleActionType.SetScrollToDay:\r\n return { ...state, scrollToDay: action.scrollToDay };\r\n case UIScheduleActionType.SetDayClickedFromDayPicker:\r\n return {\r\n ...state,\r\n clickFromDayPickerDay: action.clickFromDayPickerDay,\r\n };\r\n case UIScheduleActionType.SetClickedFromDayPicker:\r\n return {\r\n ...state,\r\n clickFromDayPicker: action.clickFromDayPicker,\r\n };\r\n case UIScheduleActionType.SetViewTypeToList:\r\n return { ...state, viewShowing: UIScheduleViewType.LISTVIEW };\r\n case UIScheduleActionType.SetViewTypeToWeek:\r\n return { ...state, viewShowing: UIScheduleViewType.WEEKVIEW };\r\n case UIScheduleActionType.SetSelectedPass:\r\n return { ...state, selectedPass: action.selectedPass };\r\n case UIScheduleActionType.SetShouldDisableSticky:\r\n return {\r\n ...state,\r\n shouldDisableSticky: action.value,\r\n };\r\n case UIScheduleActionType.SetScrollPosition:\r\n return {\r\n ...state,\r\n scrollTop: action.scrollTop,\r\n scrollBottom: action.scrollBottom,\r\n scrollRightPercent: action.scrollRightPercent,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { BookingRulesActionTypes } from '.';\r\n\r\nexport interface BookingRulesState {\r\n focusedFoereningId: number;\r\n}\r\n\r\nconst initialState: BookingRulesState = {\r\n focusedFoereningId: -1,\r\n};\r\n\r\nexport const bookingRulesReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case BookingRulesActionTypes.SET_FOCUS_ON_FOEREING: {\r\n return {\r\n ...state,\r\n focusedFoereningId: action.id,\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { FoereningSwitcherActionTypes } from '.';\r\n\r\nexport interface FoereningSwitcherState {\r\n isVisible: boolean;\r\n isSwitchingFoerening: boolean;\r\n}\r\n\r\nconst initialState: FoereningSwitcherState = {\r\n isVisible: false,\r\n isSwitchingFoerening: false,\r\n};\r\n\r\nexport const foereningSwitcherReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case FoereningSwitcherActionTypes.TOOGLE_SWITCHER: {\r\n return {\r\n ...state,\r\n isVisible: action.value,\r\n };\r\n }\r\n case FoereningSwitcherActionTypes.IS_SWITCHING: {\r\n return {\r\n ...state,\r\n isSwitchingFoerening: action.value,\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { SitecoreActionType } from './sitecoreActions';\r\nimport { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\n\r\nexport interface SitecoreState {\r\n allowBokaPass: boolean;\r\n}\r\n\r\nconst initialState: SitecoreState = {\r\n allowBokaPass: true,\r\n};\r\n\r\nexport const sitecoreReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case SitecoreActionType.AllowBokaPass:\r\n return { ...state, allowBokaPass: true };\r\n case SitecoreActionType.DisableBokaPass:\r\n return { ...state, allowBokaPass: false };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { FilterCategoryLocalState } from './uiScheduleFilterReducer';\r\nimport { ScheduleFilterCategoryName } from 'store/schedule/scheduleModels';\r\n\r\nexport enum UIScheduleFilterActionType {\r\n SetFilterToExpanded = 'UI_SCHEDULE_FILTER_EXPAND',\r\n SetFilterToMinimised = 'UI_SCHEDULE_FILTER_MINIMISE',\r\n SetCategoryClicked = 'UI_SCHEDULE_FILTER_CATEGORY_CLICKED',\r\n SetCategoryNotClicked = 'UI_SCHEDULE_FILTER_CATEGORY_NOT_CLICKED',\r\n SetCategoryAtTop = 'UI_SCHEDULE_FILTER_CATEGORY_AT_TOP',\r\n SetCategoryAtNotTop = 'UI_SCHEDULE_FILTER_CATEGORY_AT_NOT_TOP',\r\n SetCategoryTopPosition = 'UI_SCHEDULE_FILTER_CATEGORY_SET_TOP_POSITION',\r\n ToggleCategoryClicked = 'UI_SCHEDULE_FILTER_CATEGORY_TOGGLE_CLICK',\r\n SetCategoryLocalState = 'UI_SCHEDULE_FILTER_CATEGORY_SET_LOCAL_STATE',\r\n}\r\n\r\n// interface SetCategoryClickedInterface {\r\n// type: UIScheduleFilterActionType;\r\n// category: ScheduleFilterCategoryName;\r\n// }\r\ntype SetFilterToExpanded = {\r\n type: UIScheduleFilterActionType.SetFilterToExpanded;\r\n expanded: true;\r\n};\r\ntype SetFilterToMinimised = {\r\n type: UIScheduleFilterActionType.SetFilterToMinimised;\r\n expanded: false;\r\n};\r\ntype SetCategoryClicked = {\r\n type: UIScheduleFilterActionType.SetCategoryClicked;\r\n category: ScheduleFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryNotClicked = {\r\n type: UIScheduleFilterActionType.SetCategoryNotClicked;\r\n category: ScheduleFilterCategoryName;\r\n};\r\ntype ToggleCategoryClicked = {\r\n type: UIScheduleFilterActionType.ToggleCategoryClicked;\r\n category: ScheduleFilterCategoryName;\r\n clicked: boolean;\r\n};\r\n\r\ntype SetCategoryAtTop = {\r\n type: UIScheduleFilterActionType.SetCategoryAtTop;\r\n category: ScheduleFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryAtNotTop = {\r\n type: UIScheduleFilterActionType.SetCategoryAtNotTop;\r\n category: ScheduleFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryTopPosition = {\r\n type: UIScheduleFilterActionType.SetCategoryTopPosition;\r\n category: ScheduleFilterCategoryName;\r\n topPosition: number;\r\n};\r\ntype SetCategoryLocalState = {\r\n type: UIScheduleFilterActionType.SetCategoryLocalState;\r\n category: ScheduleFilterCategoryName;\r\n localState: FilterCategoryLocalState;\r\n};\r\n\r\nexport type UIScheduleFilterAction =\r\n | SetFilterToExpanded\r\n | SetFilterToMinimised\r\n | SetCategoryClicked\r\n | SetCategoryNotClicked\r\n | ToggleCategoryClicked\r\n | SetCategoryAtTop\r\n | SetCategoryAtNotTop\r\n | SetCategoryTopPosition\r\n | SetCategoryLocalState;\r\n","import { ThunkAction } from 'store';\r\nimport { setSelectedPass, setScrollToDay, setShouldDisableSticky } from '.';\r\n\r\nexport const setSelectedPassById = (passId: string, passDay: string): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const day = state.pass.read.days.find(d => d.key === passDay);\r\n if (!day) {\r\n return;\r\n }\r\n const pass = day.items.find(p => p.PassId.toString() === passId.toString());\r\n if (pass) {\r\n dispatch(setSelectedPass(pass));\r\n }\r\n};\r\n\r\nexport const scrollToDay = (day: string): ThunkAction => dispatch => {\r\n dispatch(setShouldDisableSticky(true));\r\n dispatch(setScrollToDay(day));\r\n setTimeout(() => dispatch(setShouldDisableSticky(false)), 200);\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UIScheduleFilterActionType } from './uiScheduleFilterActions';\r\nimport { ScheduleFilterCategoryName } from 'store/schedule/scheduleModels';\r\nimport { UIScheduleActionType } from '../schedule/uiScheduleActions';\r\n\r\nexport interface UIScheduleFilterState {\r\n readonly expanded: boolean;\r\n categoryState: ScheduleFilterCategoryState;\r\n}\r\n\r\nexport interface SelectedCategoryItem {\r\n id: string;\r\n name: string;\r\n}\r\n\r\nexport interface FilterCategoryLocalState {\r\n showEdit: boolean;\r\n clicked: boolean;\r\n topPosition: number;\r\n atTop: boolean;\r\n selectedCategoryItem: SelectedCategoryItem;\r\n}\r\n\r\nexport interface ScheduleFilterCategoryState {\r\n Favoritfilter: FilterCategoryLocalState;\r\n Traeningsstaelle: FilterCategoryLocalState;\r\n Traeningspass: FilterCategoryLocalState;\r\n LedareOrTraenare: FilterCategoryLocalState;\r\n Tidpunkt: FilterCategoryLocalState;\r\n Veckodag: FilterCategoryLocalState;\r\n Bokningsstatus: FilterCategoryLocalState;\r\n}\r\n\r\nconst defaultFilterCategoryLocalState: FilterCategoryLocalState = {\r\n showEdit: false,\r\n clicked: false,\r\n atTop: false,\r\n topPosition: 0,\r\n selectedCategoryItem: { id: '', name: '' },\r\n};\r\nexport const initialScheduleFilterState: UIScheduleFilterState = {\r\n expanded: false,\r\n categoryState: {\r\n Favoritfilter: defaultFilterCategoryLocalState,\r\n Traeningsstaelle: defaultFilterCategoryLocalState,\r\n Traeningspass: defaultFilterCategoryLocalState,\r\n LedareOrTraenare: defaultFilterCategoryLocalState,\r\n Tidpunkt: defaultFilterCategoryLocalState,\r\n Veckodag: defaultFilterCategoryLocalState,\r\n Bokningsstatus: defaultFilterCategoryLocalState,\r\n },\r\n};\r\n\r\nexport const getScheduleFilterIsExpanded = (scheduleFilterUIState: UIScheduleFilterState): boolean => {\r\n return scheduleFilterUIState.expanded;\r\n};\r\n\r\nexport const getCategoryLocalState = (\r\n scheduleFilterUIState: UIScheduleFilterState,\r\n internalCategoryName: ScheduleFilterCategoryName\r\n): FilterCategoryLocalState => {\r\n return scheduleFilterUIState.categoryState[internalCategoryName];\r\n};\r\n\r\nexport const scheduleFilterUiReducer: Reducer = (\r\n state = initialScheduleFilterState,\r\n action: Action\r\n) => {\r\n switch (action.type) {\r\n case UIScheduleFilterActionType.SetFilterToExpanded:\r\n return { ...state, expanded: true };\r\n case UIScheduleFilterActionType.SetFilterToMinimised:\r\n return { ...state, expanded: false };\r\n case UIScheduleFilterActionType.SetCategoryClicked: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: true };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.SetCategoryNotClicked: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: false };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.ToggleCategoryClicked: {\r\n state.categoryState.Bokningsstatus.clicked = false;\r\n state.categoryState.Favoritfilter.clicked = false;\r\n state.categoryState.LedareOrTraenare.clicked = false;\r\n state.categoryState.Tidpunkt.clicked = false;\r\n state.categoryState.Traeningspass.clicked = false;\r\n state.categoryState.Traeningsstaelle.clicked = false;\r\n state.categoryState.Veckodag.clicked = false;\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: !action.clicked };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.SetCategoryAtTop: {\r\n state.categoryState.Bokningsstatus.atTop = false;\r\n state.categoryState.Favoritfilter.atTop = false;\r\n state.categoryState.LedareOrTraenare.atTop = false;\r\n state.categoryState.Tidpunkt.atTop = false;\r\n state.categoryState.Traeningspass.atTop = false;\r\n state.categoryState.Traeningsstaelle.atTop = false;\r\n state.categoryState.Veckodag.atTop = false;\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, atTop: true };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.SetCategoryAtNotTop: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, atTop: false };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.SetCategoryTopPosition: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, topPosition: action.topPosition };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIScheduleFilterActionType.SetCategoryLocalState: {\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: action.localState,\r\n },\r\n };\r\n }\r\n case UIScheduleActionType.SetViewTypeToList: {\r\n const categoryStateProperties = Object.keys(state.categoryState);\r\n const newCategoryState = { ...state.categoryState };\r\n let numberOfCategoriesClicked = 0;\r\n let numberOfCategoriesAtTop = 0;\r\n let weHaveAtLeastOneCategoryExpanded = false;\r\n categoryStateProperties.forEach((categoryName, index) => {\r\n if (newCategoryState[categoryName].clicked) {\r\n numberOfCategoriesClicked = numberOfCategoriesClicked + 1;\r\n weHaveAtLeastOneCategoryExpanded = true;\r\n }\r\n if (newCategoryState[categoryName].atTop) {\r\n numberOfCategoriesAtTop = numberOfCategoriesAtTop + 1;\r\n weHaveAtLeastOneCategoryExpanded = true;\r\n }\r\n });\r\n const weHaveMoreThanOneCategoryExpanded = numberOfCategoriesClicked > 1 || numberOfCategoriesAtTop > 1;\r\n if (weHaveMoreThanOneCategoryExpanded) {\r\n // Unset category state clicked and category state top values wince we cannot know which values were the currently visible and we can only have one visible in list mode\r\n\r\n categoryStateProperties.forEach((categoryName, index) => {\r\n newCategoryState[categoryName] = defaultFilterCategoryLocalState;\r\n });\r\n }\r\n return {\r\n ...state,\r\n expanded: state.expanded ? state.expanded : weHaveAtLeastOneCategoryExpanded,\r\n categoryState: newCategoryState,\r\n };\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum MainMenuButtonEnum {\r\n 'MY_ACCOUNT',\r\n 'MY_WORKOUT',\r\n}\r\n\r\nexport enum MainMenuActiveItem {\r\n NONE = 'NONE',\r\n MY_ACCOUNT = 'MY_ACCOUNT',\r\n MY_WORKOUT = 'MY_WORKOUT',\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { MainMenuActionTypes, MainMenuActiveItem } from '.';\r\n\r\nexport interface MainMenuState {\r\n menuShowing: MainMenuActiveItem;\r\n}\r\n\r\nconst initialState: MainMenuState = {\r\n menuShowing: MainMenuActiveItem.NONE,\r\n};\r\n\r\nconst getMenuSettingBasedOnCurrenlyShowingMenu = (stateValue: MainMenuActiveItem, actionValue: MainMenuActiveItem) => {\r\n if (stateValue === actionValue) {\r\n return MainMenuActiveItem.NONE;\r\n } else {\r\n return actionValue;\r\n }\r\n};\r\n\r\nexport const mainMenuReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case MainMenuActionTypes.SHOW_MENU: {\r\n const menuValue = getMenuSettingBasedOnCurrenlyShowingMenu(state.menuShowing, action.menuShowing);\r\n\r\n return { ...state, menuShowing: menuValue };\r\n }\r\n case MainMenuActionTypes.CLOSE_MENU: {\r\n return {\r\n ...state,\r\n menuShowing: MainMenuActiveItem.NONE,\r\n };\r\n }\r\n default:\r\n const mainMenuIsOpen = state.menuShowing.length > 0 ? true : false;\r\n\r\n if (mainMenuIsOpen) {\r\n return { ...state };\r\n } else {\r\n return {\r\n ...state,\r\n menuShowing: MainMenuActiveItem.NONE,\r\n };\r\n }\r\n }\r\n};\r\n","import { MainMenuActiveItem } from '.';\r\n\r\nexport enum MainMenuActionTypes {\r\n SHOW_MENU = 'MAIN_MENU/SHOW_MENU',\r\n CLOSE_MENU = 'MAIN_MENU/CLOSE_MENU',\r\n}\r\n\r\ninterface MainMenuShowingAction {\r\n type: MainMenuActionTypes.SHOW_MENU;\r\n menuShowing: MainMenuActiveItem;\r\n}\r\n\r\ninterface MainMenuCloseAction {\r\n type: MainMenuActionTypes.CLOSE_MENU;\r\n}\r\n\r\nexport const openMainMenu = (menuShowing: MainMenuActiveItem): MainMenuShowingAction => ({\r\n type: MainMenuActionTypes.SHOW_MENU,\r\n menuShowing,\r\n});\r\n\r\nexport const closeMainMenu = (): MainMenuShowingAction => ({\r\n type: MainMenuActionTypes.SHOW_MENU,\r\n menuShowing: MainMenuActiveItem.NONE,\r\n});\r\n\r\nexport type MainMenuActions = MainMenuShowingAction | MainMenuCloseAction;\r\n","import { HeaderIconEnum } from './headerReducer';\r\n\r\nexport enum HeaderActionTypes {\r\n SET_ICONS = 'SET_ICONS',\r\n RESET_ICONS = 'RESET_ICONS',\r\n}\r\n\r\ninterface SetIconsAction {\r\n type: HeaderActionTypes.SET_ICONS;\r\n leftDesktopIcon?: HeaderIconEnum;\r\n rightDesktopIcon?: HeaderIconEnum;\r\n leftMobileIcon?: HeaderIconEnum;\r\n rightMobileIcon?: HeaderIconEnum;\r\n}\r\ninterface ResetIconsAction {\r\n type: HeaderActionTypes.RESET_ICONS;\r\n}\r\n\r\nexport const setHeaderIcons = (\r\n leftDesktopIcon?: HeaderIconEnum,\r\n rightDesktopIcon?: HeaderIconEnum,\r\n leftMobileIcon?: HeaderIconEnum,\r\n rightMobileIcon?: HeaderIconEnum\r\n): SetIconsAction => ({\r\n type: HeaderActionTypes.SET_ICONS,\r\n leftDesktopIcon,\r\n rightDesktopIcon,\r\n leftMobileIcon,\r\n rightMobileIcon,\r\n});\r\n\r\nexport const resetHeaderIcons = (): ResetIconsAction => ({\r\n type: HeaderActionTypes.RESET_ICONS,\r\n});\r\n\r\nexport type HeaderAction = SetIconsAction | ResetIconsAction;\r\n","import { MainMenuActiveItem, openMainMenu, closeMainMenu } from '.';\r\nimport { Dispatch } from 'store';\r\n\r\nexport const setActiveMenu = (menu: MainMenuActiveItem) => (dispatch: Dispatch) => dispatch(openMainMenu(menu));\r\n\r\nexport const closeMenu = () => (dispatch: Dispatch) => dispatch(closeMainMenu());\r\n","import { HeaderActionTypes } from './headerActions';\r\nimport { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\n\r\nexport enum HeaderIconEnum {\r\n FRISKIS_LOGO = 'FRISKIS_LOGO',\r\n FILTER = 'FILTER',\r\n NONE = 'NONE',\r\n CLOSE = 'CLOSE',\r\n CALENDAR = 'CALENDAR',\r\n BACK = 'BACK',\r\n SHOPPINGBASKET = 'SHOPPINGBASKET',\r\n\r\n INITIAL = 'INITIAL',\r\n}\r\n\r\nexport interface HeaderState {\r\n leftDesktopIcon: HeaderIconEnum;\r\n rightDesktopIcon: HeaderIconEnum;\r\n leftMobileIcon: HeaderIconEnum;\r\n rightMobileIcon: HeaderIconEnum;\r\n title: string;\r\n visible: boolean;\r\n}\r\n\r\nconst initialState: HeaderState = {\r\n leftDesktopIcon: HeaderIconEnum.FRISKIS_LOGO,\r\n rightDesktopIcon: HeaderIconEnum.NONE,\r\n leftMobileIcon: HeaderIconEnum.FRISKIS_LOGO,\r\n rightMobileIcon: HeaderIconEnum.CALENDAR,\r\n title: '',\r\n visible: true,\r\n};\r\n\r\nexport const headerReducer: Reducer = (state = initialState, action: Action): HeaderState => {\r\n switch (action.type) {\r\n case HeaderActionTypes.SET_ICONS:\r\n return {\r\n ...state,\r\n leftDesktopIcon: !!action.leftDesktopIcon\r\n ? action.leftDesktopIcon === HeaderIconEnum.INITIAL\r\n ? initialState.leftDesktopIcon\r\n : action.leftDesktopIcon\r\n : state.leftDesktopIcon,\r\n rightDesktopIcon: !!action.rightDesktopIcon\r\n ? action.rightDesktopIcon === HeaderIconEnum.INITIAL\r\n ? initialState.rightDesktopIcon\r\n : action.rightDesktopIcon\r\n : state.rightDesktopIcon,\r\n leftMobileIcon: !!action.leftMobileIcon\r\n ? action.leftMobileIcon === HeaderIconEnum.INITIAL\r\n ? initialState.leftMobileIcon\r\n : action.leftMobileIcon\r\n : state.leftMobileIcon,\r\n rightMobileIcon: !!action.rightMobileIcon\r\n ? action.rightMobileIcon === HeaderIconEnum.INITIAL\r\n ? initialState.rightMobileIcon\r\n : action.rightMobileIcon\r\n : state.rightMobileIcon,\r\n };\r\n case HeaderActionTypes.RESET_ICONS:\r\n return {\r\n ...initialState,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UIScheduleState } from '../schedule/uiScheduleReducer';\r\n\r\nexport enum SidebarStatus {\r\n 'HIDDEN' = 'HIDDEN',\r\n 'SHOWING' = 'SHOWING',\r\n}\r\n\r\nexport enum SidebarContentType {\r\n 'SCHEDULE' = 'SCHEDULE',\r\n}\r\n\r\nexport enum SidebarSize {\r\n 'MINIMISED' = 'MINIMISED',\r\n 'MAXIMISED' = 'MAXIMISED',\r\n}\r\n\r\nexport interface SideBarState {\r\n visibility: SidebarStatus;\r\n contentType: SidebarContentType | undefined | null;\r\n size: SidebarSize;\r\n}\r\n\r\nconst initialState: SideBarState = {\r\n visibility: SidebarStatus.HIDDEN,\r\n contentType: SidebarContentType.SCHEDULE,\r\n size: SidebarSize.MINIMISED,\r\n};\r\n\r\nexport const getIsSidebarShowing = (sideBarState: SideBarState): boolean => {\r\n if (sideBarState) {\r\n return sideBarState.visibility === SidebarStatus.SHOWING;\r\n }\r\n return false;\r\n};\r\nexport const getIsSidebarMaximised = (sideBarState: SideBarState): boolean => {\r\n if (sideBarState) {\r\n return sideBarState.size === SidebarSize.MAXIMISED;\r\n }\r\n return false;\r\n};\r\nexport const showSideBarInFullDesktopWidth = (\r\n sideBarState: SideBarState,\r\n scheduleUIState: UIScheduleState\r\n): boolean => {\r\n if (sideBarState) {\r\n // return getIsSidebarMaximised(sideBarState) || getScheduleHasWeekView(scheduleUIState);\r\n return getIsSidebarMaximised(sideBarState);\r\n }\r\n return false;\r\n};\r\n\r\nexport const sidebarReducer: Reducer = (state = initialState, action: Action) => {\r\n // console.info('sidebarReducer state:', state);\r\n // console.info('sidebarReducer action:', action);\r\n switch (action.type) {\r\n case 'UI_SIDEBAR_LAUNCH': {\r\n return { ...state, visibility: SidebarStatus.SHOWING };\r\n }\r\n case 'UI_SIDEBAR_HIDE': {\r\n return { ...state, visibility: SidebarStatus.HIDDEN };\r\n }\r\n case 'UI_SIDEBAR_SET_CONTENT_TYPE': {\r\n return { ...state, contentType: action.contentType };\r\n }\r\n case 'UI_SIDEBAR_SET_SIZE_MINIMISED': {\r\n return { ...state, size: SidebarSize.MINIMISED };\r\n }\r\n case 'UI_SIDEBAR_SET_SIZE_MAXIMISED': {\r\n return { ...state, size: SidebarSize.MAXIMISED };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\n\r\nexport enum SiteSwitcherStatus {\r\n 'HIDDEN' = 'HIDDEN',\r\n 'SHOWING' = 'SHOWING',\r\n 'SHOW_FULLSCREEN' = 'SHOW_FULLSCREEN',\r\n}\r\n\r\nexport interface SiteSwitcherState {\r\n visibility: SiteSwitcherStatus;\r\n}\r\n\r\nconst initialState: SiteSwitcherState = {\r\n visibility: SiteSwitcherStatus.HIDDEN,\r\n};\r\n\r\nexport const siteswitcherReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case 'UI_SITESWITCHER_SHOW': {\r\n return { ...state, visibility: SiteSwitcherStatus.SHOWING };\r\n }\r\n case 'UI_SITESWITCHER_HIDE': {\r\n return { ...state, visibility: SiteSwitcherStatus.HIDDEN };\r\n }\r\n case 'UI_SITESWITCHER_SHOW_FULLSCREEN': {\r\n return { ...state, visibility: SiteSwitcherStatus.SHOW_FULLSCREEN };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { hideSideBar } from './sideBarActions';\r\nimport { ThunkAction } from 'store';\r\n\r\nexport const closeSideBar = (): ThunkAction => dispatch => {\r\n dispatch(hideSideBar());\r\n};\r\n","import { SidebarContentType, SidebarStatus, SidebarSize } from './sideBarReducer';\r\n\r\nexport interface SidebarLaunchAction {\r\n type: 'UI_SIDEBAR_LAUNCH';\r\n visibility: SidebarStatus;\r\n}\r\nexport interface SidebarHideAction {\r\n type: 'UI_SIDEBAR_HIDE';\r\n visibility: SidebarStatus;\r\n}\r\n\r\nexport interface SidebarContentTypeAction {\r\n type: 'UI_SIDEBAR_SET_CONTENT_TYPE';\r\n contentType: SidebarContentType;\r\n}\r\nexport interface SidebarSizeMinimisdeAction {\r\n type: 'UI_SIDEBAR_SET_SIZE_MINIMISED';\r\n size: SidebarSize.MINIMISED;\r\n}\r\nexport interface SidebarSizeMaximisedAction {\r\n type: 'UI_SIDEBAR_SET_SIZE_MAXIMISED';\r\n size: SidebarSize.MAXIMISED;\r\n}\r\n\r\nexport const hideSideBar = (): SidebarHideAction => ({\r\n type: 'UI_SIDEBAR_HIDE',\r\n visibility: SidebarStatus.HIDDEN,\r\n});\r\n\r\nexport type SideBarAction =\r\n | SidebarLaunchAction\r\n | SidebarHideAction\r\n | SidebarContentTypeAction\r\n | SidebarSizeMinimisdeAction\r\n | SidebarSizeMaximisedAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action, RootState } from 'store';\r\n\r\nexport enum ApplicationViewEnum {\r\n 'MOBILE' = 'MOBILE',\r\n 'DESKTOP' = 'DESKTOP',\r\n}\r\n\r\nexport interface ApplicationMode {\r\n applicationView: ApplicationViewEnum;\r\n}\r\n\r\nconst initialState: ApplicationMode = {\r\n applicationView: ApplicationViewEnum.MOBILE,\r\n};\r\nexport const getApplicationViewModeIsDesktop = (state: RootState): boolean => {\r\n return state.global.ui.applicationMode.applicationView === ApplicationViewEnum.DESKTOP;\r\n};\r\n\r\nexport const applicationModeReducer: Reducer = (state = initialState, action: Action) => {\r\n // console.info('applicationModeReducer state:', state);\r\n // console.info('applicationModeReducer action:', action);\r\n switch (action.type) {\r\n case 'UI_APPLICATION_MODE_SET_MOBILE': {\r\n return { ...state, applicationView: ApplicationViewEnum.MOBILE };\r\n }\r\n case 'UI_APPLICATION_MODE_SET_DESKTOP': {\r\n return { ...state, applicationView: ApplicationViewEnum.DESKTOP };\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","export interface UISettingsProfileUnderEdit {\r\n FirstName: boolean;\r\n LastName: boolean;\r\n Email: boolean;\r\n PhoneNumber: boolean;\r\n Address: boolean;\r\n ZipCode: boolean;\r\n City: boolean;\r\n PropertyFieldUnderClick?: ProfilePropertyNameValues;\r\n}\r\nexport enum ProfilePropertyNameValues {\r\n FirstName = 'FirstName',\r\n LastName = 'LastName',\r\n Email = 'Email',\r\n PhoneNumber = 'PhoneNumber',\r\n Address = 'Address',\r\n ZipCode = 'ZipCode',\r\n City = 'City',\r\n}\r\n","import { ProfilePropertyNameValues, UISettingsProfileUnderEdit } from './uiSettingsProfileModels';\r\n\r\nexport enum uiSettingsProfileActionType {\r\n GetUISettingsProfileUnderEdit = 'GET_UI_SETTINGS_PROFILE_UNDER_EDIT',\r\n UpdateUISettingsProfileUnderEdit = 'UPDATE_UI_SETTINGS_PROFILE_UNDER_EDIT',\r\n UpdateUISettingsProfileUnderClick = 'UPDATE_UI_SETTINGS_PROFILE_UNDER_CLICK',\r\n}\r\n\r\nexport interface GetUISettingsProfileAction {\r\n type: uiSettingsProfileActionType.GetUISettingsProfileUnderEdit;\r\n}\r\n\r\nexport interface UpdateUISettingsProfileAction {\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit;\r\n uiSettingsProfileUnderEdit: UISettingsProfileUnderEdit;\r\n}\r\n\r\nexport interface UpdateUISettingsProfileClickAction {\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderClick;\r\n // uiSettingsProfileUnderEdit: UISettingsProfileUnderEdit;\r\n propertyFieldUnderClick: ProfilePropertyNameValues;\r\n}\r\n\r\nexport const getUISettingsProfileUnderEdit = (): uiSettingsProfileAction => ({\r\n type: uiSettingsProfileActionType.GetUISettingsProfileUnderEdit,\r\n});\r\n\r\nexport const updateUISettingsProfileUnderEdit = (\r\n uiSettingsProfileUnderEdit: UISettingsProfileUnderEdit\r\n): uiSettingsProfileAction => ({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit,\r\n uiSettingsProfileUnderEdit: uiSettingsProfileUnderEdit,\r\n});\r\n\r\nexport const updateUISettingsProfileUnderFocus = (\r\n uiSettingsProfileUnderEdit: UISettingsProfileUnderEdit,\r\n propertyFieldUnderClick: ProfilePropertyNameValues\r\n): uiSettingsProfileAction => ({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderClick,\r\n // uiSettingsProfileUnderEdit: uiSettingsProfileUnderEdit,\r\n propertyFieldUnderClick: propertyFieldUnderClick,\r\n});\r\n\r\nexport type uiSettingsProfileAction =\r\n | GetUISettingsProfileAction\r\n | UpdateUISettingsProfileAction\r\n | UpdateUISettingsProfileClickAction;\r\n","import { UIScheduleFilterAction } from '../schedule-filter/uiScheduleFilterActions';\r\n\r\nexport enum UIBookingActionType {\r\n SetScrollToDay = 'UI/BOOKING/SETSCROLLTODAY',\r\n SetSelectedDayPickerDay = 'UI/BOOKING/SET_SELECTED_DAYPICKER_DAY',\r\n}\r\n\r\nexport type SetScrollToDayAction = {\r\n type: UIBookingActionType.SetScrollToDay;\r\n scrollToDay: string;\r\n};\r\n\r\nexport type UIBookingSetSelectedDayAction = {\r\n type: UIBookingActionType.SetSelectedDayPickerDay;\r\n centerDay: string;\r\n};\r\n\r\nexport type UIBookingAction =\r\n | SetScrollToDayAction\r\n // | ToggleDayListAction\r\n | UIScheduleFilterAction\r\n | UIBookingSetSelectedDayAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { uiSettingsProfileActionType } from './uiSettingsProfileActions';\r\nimport { UISettingsProfileUnderEdit } from './uiSettingsProfileModels';\r\n\r\nexport interface UISettingsProfileState {\r\n uiProfileSettings: UISettingsProfileUnderEdit;\r\n}\r\n\r\nconst initialState: UISettingsProfileState = {\r\n uiProfileSettings: {\r\n FirstName: false,\r\n LastName: false,\r\n Email: false,\r\n Address: false,\r\n ZipCode: false,\r\n City: false,\r\n PhoneNumber: false,\r\n },\r\n};\r\n\r\nexport const uiSettingsProfileReducer: Reducer = (\r\n state: UISettingsProfileState = initialState,\r\n action: Action\r\n) => {\r\n switch (action.type) {\r\n case uiSettingsProfileActionType.GetUISettingsProfileUnderEdit:\r\n return { ...state };\r\n case uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit:\r\n return {\r\n ...state,\r\n uiProfileSettings: action.uiSettingsProfileUnderEdit,\r\n };\r\n case uiSettingsProfileActionType.UpdateUISettingsProfileUnderClick:\r\n return {\r\n ...state,\r\n uiProfileSettings: {\r\n ...state.uiProfileSettings,\r\n PropertyFieldUnderClick: action.propertyFieldUnderClick,\r\n },\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UIBookingActionType, SetScrollToDayAction, UIBookingSetSelectedDayAction } from '.';\r\n\r\nexport interface UIBookingState {\r\n scrollToDay: string;\r\n centerDay: string;\r\n}\r\n\r\nconst initialState: UIBookingState = {\r\n scrollToDay: '',\r\n centerDay: '',\r\n};\r\n\r\nexport const setScrollToDay = (day: string): SetScrollToDayAction => ({\r\n type: UIBookingActionType.SetScrollToDay,\r\n scrollToDay: day,\r\n});\r\n\r\nexport const setSelectedDay = (day: string): UIBookingSetSelectedDayAction => ({\r\n type: UIBookingActionType.SetSelectedDayPickerDay,\r\n centerDay: day,\r\n});\r\n\r\nexport const bookingUiReducer: Reducer = (state = initialState, action: Action): UIBookingState => {\r\n switch (action.type) {\r\n case UIBookingActionType.SetScrollToDay:\r\n return { ...state, scrollToDay: action.scrollToDay };\r\n case UIBookingActionType.SetSelectedDayPickerDay:\r\n return { ...state, centerDay: action.centerDay };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { Anlaeggning } from './anlaeggningarReducer';\r\n\r\nexport enum AnlaeggningarActionType {\r\n GetAnlaeggningar = 'GET_ANLAGGNINGAR',\r\n}\r\n\r\ninterface GetAnlaeggningarAction {\r\n type: AnlaeggningarActionType.GetAnlaeggningar;\r\n payload: Array;\r\n}\r\n\r\nexport const getAnlaeggningar = (annlaeggningar: Array) => ({\r\n type: AnlaeggningarActionType.GetAnlaeggningar,\r\n payload: annlaeggningar,\r\n});\r\n\r\nexport type AnlaeggningAction = GetAnlaeggningarAction;\r\n","import { FilterCategoryLocalState, FilterCategoryType } from './uiShopFilterReducer';\r\nimport { ShopFilterCategoryName } from 'store/shop/shopModels';\r\n\r\nexport enum UIShopFilterActionType {\r\n SetFilterToExpanded = 'UI_SHOP_FILTER_EXPAND',\r\n SetFilterToMinimised = 'UI_SHOP_FILTER_MINIMISE',\r\n SetCategoryClicked = 'UI_SHOP_FILTER_CATEGORY_CLICKED',\r\n SetCategoryNotClicked = 'UI_SHOP_FILTER_CATEGORY_NOT_CLICKED',\r\n SetCategoryAtTop = 'UI_SHOP_FILTER_CATEGORY_AT_TOP',\r\n SetCategoryAtNotTop = 'UI_SHOP_FILTER_CATEGORY_AT_NOT_TOP',\r\n SetCategoryTopPosition = 'UI_SHOP_FILTER_CATEGORY_SET_TOP_POSITION',\r\n ToggleCategoryClicked = 'UI_SHOP_FILTER_CATEGORY_TOGGLE_CLICK',\r\n SetCategoryLocalState = 'UI_SHOP_FILTER_CATEGORY_SET_LOCAL_STATE',\r\n ToggleShowProducts = 'UI_SHOP_FILTER_TOGGLE_SHOW_PRODUCTS',\r\n\r\n SetCategory = 'UI_SHOP_FILTER_SET_SELECTED_CATEGORY',\r\n}\r\n\r\nexport interface SetFilterSelectedCategory {\r\n type: UIShopFilterActionType.SetCategory;\r\n selectedCategory: FilterCategoryType;\r\n}\r\n\r\ntype SetFilterToExpanded = {\r\n type: UIShopFilterActionType.SetFilterToExpanded;\r\n expanded: true;\r\n};\r\ntype SetFilterToMinimised = {\r\n type: UIShopFilterActionType.SetFilterToMinimised;\r\n expanded: false;\r\n};\r\ntype SetCategoryClicked = {\r\n type: UIShopFilterActionType.SetCategoryClicked;\r\n category: ShopFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryNotClicked = {\r\n type: UIShopFilterActionType.SetCategoryNotClicked;\r\n category: ShopFilterCategoryName;\r\n};\r\ntype ToggleCategoryClicked = {\r\n type: UIShopFilterActionType.ToggleCategoryClicked;\r\n category: ShopFilterCategoryName;\r\n clicked: boolean;\r\n};\r\n\r\ntype SetCategoryAtTop = {\r\n type: UIShopFilterActionType.SetCategoryAtTop;\r\n category: ShopFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryAtNotTop = {\r\n type: UIShopFilterActionType.SetCategoryAtNotTop;\r\n category: ShopFilterCategoryName;\r\n};\r\n\r\ntype SetCategoryTopPosition = {\r\n type: UIShopFilterActionType.SetCategoryTopPosition;\r\n category: ShopFilterCategoryName;\r\n topPosition: number;\r\n};\r\n\r\ntype SetCategoryLocalState = {\r\n type: UIShopFilterActionType.SetCategoryLocalState;\r\n category: ShopFilterCategoryName;\r\n localState: FilterCategoryLocalState;\r\n};\r\n\r\nexport interface ToggleShowProducts {\r\n type: UIShopFilterActionType.ToggleShowProducts;\r\n showing: boolean;\r\n}\r\n\r\nexport type UIShopFilterAction =\r\n | SetFilterToExpanded\r\n | SetFilterToMinimised\r\n | SetCategoryClicked\r\n | SetCategoryNotClicked\r\n | ToggleCategoryClicked\r\n | SetCategoryAtTop\r\n | SetCategoryAtNotTop\r\n | SetCategoryTopPosition\r\n | SetCategoryLocalState\r\n | SetFilterSelectedCategory\r\n | ToggleShowProducts;\r\n","import { Reducer } from 'redux';\r\nimport { AnlaeggningarActionType } from './anlaeggningarAction';\r\nimport { Action } from 'store';\r\n\r\nexport interface Anlaeggning {\r\n AnlaeggningId: string;\r\n AnlaeggningNamn: string;\r\n}\r\n\r\nexport interface AnlaeggningState {\r\n anlaeggningar: Array;\r\n}\r\n\r\nconst initialState: AnlaeggningState = {\r\n anlaeggningar: [],\r\n};\r\n\r\nexport const anlaeggningarReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case AnlaeggningarActionType.GetAnlaeggningar:\r\n return { ...state, anlaeggningar: action.payload };\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { UIShopFilterActionType, SetFilterSelectedCategory, ToggleShowProducts } from './uiShopFilterActions';\r\nimport { ShopFilterCategoryName } from 'store/shop/shopModels';\r\n\r\nexport type FilterCategoryType = 'Träningskort' | 'Medlemskap';\r\n\r\nexport interface UIShopFilterState {\r\n readonly expanded: boolean;\r\n categoryState: ShopFilterCategoryState;\r\n selectedCategory: FilterCategoryType;\r\n ShouldShowProducts: boolean;\r\n}\r\n\r\nexport interface FilterCategoryLocalState {\r\n clicked: boolean;\r\n topPosition: number;\r\n atTop: boolean;\r\n}\r\n\r\nexport interface ShopFilterCategoryState {\r\n ProductWhat: FilterCategoryLocalState;\r\n ProductWho: FilterCategoryLocalState;\r\n ProductWhen: FilterCategoryLocalState;\r\n ProductHow: FilterCategoryLocalState;\r\n}\r\n\r\nconst defaultFilterCategoryLocalState: FilterCategoryLocalState = {\r\n clicked: false,\r\n atTop: false,\r\n topPosition: 0,\r\n};\r\nexport const initialShopFilterState: UIShopFilterState = {\r\n expanded: false,\r\n selectedCategory: 'Träningskort',\r\n ShouldShowProducts: false,\r\n categoryState: {\r\n ProductWhat: defaultFilterCategoryLocalState,\r\n ProductWho: defaultFilterCategoryLocalState,\r\n ProductWhen: defaultFilterCategoryLocalState,\r\n ProductHow: defaultFilterCategoryLocalState,\r\n },\r\n};\r\n\r\nexport const setSelectedCategory = (selectedCategory: FilterCategoryType): SetFilterSelectedCategory => ({\r\n type: UIShopFilterActionType.SetCategory,\r\n selectedCategory: selectedCategory,\r\n});\r\n\r\nexport const getShopFilterIsExpanded = (shopFilterUIState: UIShopFilterState): boolean => {\r\n return shopFilterUIState.expanded;\r\n};\r\n\r\nexport const getCategoryLocalState = (\r\n shopFilterUIState: UIShopFilterState,\r\n internalCategoryName: ShopFilterCategoryName\r\n): FilterCategoryLocalState => {\r\n return shopFilterUIState.categoryState[internalCategoryName];\r\n};\r\n\r\nexport const toggleShowProducts = (showing: boolean): ToggleShowProducts => ({\r\n type: UIShopFilterActionType.ToggleShowProducts,\r\n showing: showing,\r\n});\r\n\r\nexport const shopFilterUIReducer: Reducer = (state = initialShopFilterState, action: Action) => {\r\n switch (action.type) {\r\n case UIShopFilterActionType.SetCategory:\r\n return { ...state, selectedCategory: action.selectedCategory };\r\n\r\n case UIShopFilterActionType.SetFilterToExpanded:\r\n return { ...state, expanded: true };\r\n\r\n case UIShopFilterActionType.SetFilterToMinimised:\r\n return { ...state, expanded: false };\r\n\r\n case UIShopFilterActionType.SetCategoryClicked: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: true };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n\r\n case UIShopFilterActionType.SetCategoryNotClicked: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: false };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n\r\n case UIShopFilterActionType.ToggleCategoryClicked: {\r\n state.categoryState.ProductWho.clicked = false;\r\n state.categoryState.ProductWhat.clicked = false;\r\n state.categoryState.ProductWhen.clicked = false;\r\n state.categoryState.ProductHow.clicked = false;\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, clicked: !action.clicked };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIShopFilterActionType.SetCategoryAtTop: {\r\n state.categoryState.ProductWho.atTop = false;\r\n state.categoryState.ProductWhat.atTop = false;\r\n state.categoryState.ProductWhen.atTop = false;\r\n state.categoryState.ProductHow.atTop = false;\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, atTop: true };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIShopFilterActionType.SetCategoryAtNotTop: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, atTop: false };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIShopFilterActionType.SetCategoryTopPosition: {\r\n let localState = state.categoryState[action.category];\r\n localState = { ...localState, topPosition: action.topPosition };\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: localState,\r\n },\r\n };\r\n }\r\n case UIShopFilterActionType.SetCategoryLocalState: {\r\n return {\r\n ...state,\r\n categoryState: {\r\n ...state.categoryState,\r\n [action.category]: action.localState,\r\n },\r\n };\r\n }\r\n case UIShopFilterActionType.ToggleShowProducts: {\r\n return {\r\n ...state,\r\n ShouldShowProducts: action.showing,\r\n };\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","export enum ImageActionType {\r\n SetImages = 'SET_IMAGES',\r\n}\r\n\r\nexport interface SetImages {\r\n type: ImageActionType.SetImages;\r\n images: { [key: string]: string };\r\n}\r\n\r\nexport const setImages = (images: { [key: string]: string }): SetImages => ({\r\n type: ImageActionType.SetImages,\r\n images,\r\n});\r\n\r\nexport type ImageAction = SetImages;\r\n","export enum NewNotificationActionTypes {\r\n SET_NEW_NOTIFICATIONS_COUNT = 'NEW_NOTIFICATION/SET_NEW_NOTIFICATIONS_COUNT',\r\n}\r\n\r\ninterface SetNewNotificationCountAction {\r\n type: NewNotificationActionTypes.SET_NEW_NOTIFICATIONS_COUNT;\r\n value: number;\r\n}\r\n\r\nexport const setNewNotificationCount = (count: number): SetNewNotificationCountAction => ({\r\n type: NewNotificationActionTypes.SET_NEW_NOTIFICATIONS_COUNT,\r\n value: count,\r\n});\r\n\r\nexport type ShowNewNotificationIndicatorActions = SetNewNotificationCountAction;\r\n","import { ImageActionType } from './imageActions';\r\nimport { Reducer } from 'redux';\r\nimport { Action } from 'store/rootReducer';\r\n\r\nexport interface ImageState {\r\n images: { [key: string]: string };\r\n}\r\n\r\nconst initalState = {\r\n images: {},\r\n};\r\n\r\nexport const imageReducer: Reducer = (state = initalState, action: Action): ImageState => {\r\n switch (action.type) {\r\n case ImageActionType.SetImages:\r\n return { ...state, images: action.images };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { api } from 'api';\r\nimport { ThunkAction } from 'store';\r\nimport { setImages } from './imageActions';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from 'store/global/fetch';\r\nexport const getImages = (): ThunkAction => dispatch => {\r\n dispatch(fetching(-1, FetchStatusAggregateTypes.GET_BILDER));\r\n const promise = api.get<{ [key: string]: string }>('image/getImages', {\r\n anonymousCall: true,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(setImages(result.result));\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.GET_BILDER, result.result));\r\n } else {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.GET_BILDER));\r\n }\r\n });\r\n\r\n return promise;\r\n};\r\n","export enum PasswordResetActionTypes {\r\n SET_PASSWORD_RESET = 'SET_PASSWORD_RESET',\r\n CLEAR_PASSWORD_RESET = 'CLEAR_PASSWORD_RESET',\r\n RESET_PASSWORD_RESULT = 'RESET_PASSWORD_RESULT',\r\n SET_NEW_PASSWORD = 'SET_NEW_PASSWORD',\r\n SET_IS_NEW_PASSWORD_VALID = 'SET_IS_NEW_PASSWORD_VALID',\r\n SET_REPEAT_NEW_PASSWORD = 'SET_REPEAT_NEW_PASSWORD',\r\n SET_IS_REPEAT_NEW_PASSWORD_VALID = 'SET_IS_REPEAT_NEW_PASSWORD_VALID',\r\n}\r\n\r\nexport enum PasswordResetErrorCodes {\r\n UNKNOWN = 'UNKNOWN',\r\n INVALID_TOKEN = 'INVALID_TOKEN',\r\n}\r\n\r\nexport interface SetPasswordResetAction {\r\n type: PasswordResetActionTypes.SET_PASSWORD_RESET;\r\n passwordResetRequestCompleted?: boolean;\r\n isSuccess?: boolean;\r\n}\r\n\r\nexport interface ClearPasswordResetAction {\r\n type: PasswordResetActionTypes.CLEAR_PASSWORD_RESET;\r\n}\r\n\r\nexport interface SetPasswordResetResultAction {\r\n type: PasswordResetActionTypes.RESET_PASSWORD_RESULT;\r\n passwordResetSucceeded?: boolean;\r\n errorCode?: PasswordResetErrorCodes;\r\n}\r\n\r\nexport interface SetNewPasswordAction {\r\n type: PasswordResetActionTypes.SET_NEW_PASSWORD;\r\n value: string;\r\n}\r\n\r\nexport interface SetRepeatNewPasswordAction {\r\n type: PasswordResetActionTypes.SET_REPEAT_NEW_PASSWORD;\r\n value: string;\r\n}\r\n\r\nexport interface SetIsNewPasswordValidAction {\r\n type: PasswordResetActionTypes.SET_IS_NEW_PASSWORD_VALID;\r\n isValid: boolean;\r\n}\r\n\r\nexport interface SetIsRepeatNewPasswordValidAction {\r\n type: PasswordResetActionTypes.SET_IS_REPEAT_NEW_PASSWORD_VALID;\r\n isValid: boolean;\r\n}\r\n\r\nexport type PasswordResetActions =\r\n | SetPasswordResetAction\r\n | ClearPasswordResetAction\r\n | SetPasswordResetResultAction\r\n | SetNewPasswordAction\r\n | SetRepeatNewPasswordAction\r\n | SetIsNewPasswordValidAction\r\n | SetIsRepeatNewPasswordValidAction;\r\n\r\nexport interface PasswordResetState {\r\n passwordResetRequestCompleted?: boolean;\r\n requestPasswordResetLinkResult?: boolean;\r\n passwordResetSucceeded?: boolean;\r\n passwordResetErrorCode?: PasswordResetErrorCodes;\r\n newPassword: string;\r\n repeatNewPassword: string;\r\n isNewPasswordValid: boolean;\r\n isRepeatNewPassword: boolean;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { NewNotificationActionTypes } from '.';\r\n\r\nexport interface NewNotificationState {\r\n newNotificationsCount?: number;\r\n}\r\n\r\nconst initialState: NewNotificationState = {};\r\n\r\nexport const newNotificationReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case NewNotificationActionTypes.SET_NEW_NOTIFICATIONS_COUNT: {\r\n return {\r\n ...state,\r\n newNotificationsCount: action.value,\r\n };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { setNewNotificationCount } from './newNotificationActions';\r\nimport { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\n\r\nexport const fetchNewNotificationsCount = (): ThunkAction => dispatch => {\r\n const promise = api.get('Notis/GetNewNotiserCount');\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(setNewNotificationCount(result.result));\r\n }\r\n });\r\n return promise;\r\n};\r\n","import { BookingRulesState, bookingRulesReducer } from './bookingRules/bookingRulesReducer';\r\nimport { FoereningSwitcherState, foereningSwitcherReducer } from './foereningSwitcher/foereningSwitcherReducer';\r\nimport { SitecoreState, sitecoreReducer } from './sitecore/sitecoreReducer';\r\nimport { combineReducers } from 'redux';\r\nimport { scheduleUiReducer, UIScheduleState } from './schedule';\r\nimport { scheduleFilterUiReducer, UIScheduleFilterState } from './schedule-filter';\r\nimport { languageUiReducer, LanguageUiState } from './language';\r\nimport { mainMenuReducer, MainMenuState } from './main-menu';\r\nimport { headerReducer, HeaderState } from './header';\r\nimport { sidebarReducer, SideBarState } from './side-bar';\r\nimport { siteswitcherReducer, SiteSwitcherState } from './siteswitcher';\r\nimport { applicationModeReducer, ApplicationMode } from './application-mode';\r\nimport { uiSettingsProfileReducer, UISettingsProfileState } from './settings/profile';\r\nimport { UIBookingState, bookingUiReducer } from './bookings';\r\nimport { AnlaeggningState, anlaeggningarReducer } from './anlaeggningar';\r\nimport { shopFilterUIReducer, UIShopFilterState } from './shop-filter';\r\nimport { ImageState, imageReducer } from './image';\r\nimport { NewNotificationState, newNotificationReducer } from './newNotification';\r\n\r\nexport interface UIState {\r\n readonly language: LanguageUiState;\r\n bottomMenu: MainMenuState;\r\n schedule: UIScheduleState;\r\n bookings: UIBookingState;\r\n scheduleFilter: UIScheduleFilterState;\r\n header: HeaderState;\r\n sideBar: SideBarState;\r\n siteSwitcher: SiteSwitcherState;\r\n applicationMode: ApplicationMode;\r\n uiSettingsProfileState: UISettingsProfileState;\r\n anlaeggningar: AnlaeggningState;\r\n sitecore: SitecoreState;\r\n shopFilter: UIShopFilterState;\r\n image: ImageState;\r\n foereningSwitcher: FoereningSwitcherState;\r\n newNotification: NewNotificationState;\r\n bookingRules: BookingRulesState;\r\n}\r\n\r\nexport const uiReducer = combineReducers({\r\n language: languageUiReducer,\r\n bottomMenu: mainMenuReducer,\r\n schedule: scheduleUiReducer,\r\n scheduleFilter: scheduleFilterUiReducer,\r\n header: headerReducer,\r\n sideBar: sidebarReducer,\r\n siteSwitcher: siteswitcherReducer,\r\n applicationMode: applicationModeReducer,\r\n uiSettingsProfileState: uiSettingsProfileReducer,\r\n bookings: bookingUiReducer,\r\n anlaeggningar: anlaeggningarReducer,\r\n sitecore: sitecoreReducer,\r\n shopFilter: shopFilterUIReducer,\r\n image: imageReducer,\r\n foereningSwitcher: foereningSwitcherReducer,\r\n newNotification: newNotificationReducer,\r\n bookingRules: bookingRulesReducer,\r\n});\r\n","import {\r\n PasswordResetActionTypes,\r\n SetPasswordResetAction,\r\n ClearPasswordResetAction,\r\n SetPasswordResetResultAction,\r\n PasswordResetErrorCodes,\r\n SetNewPasswordAction,\r\n SetRepeatNewPasswordAction,\r\n SetIsNewPasswordValidAction,\r\n SetIsRepeatNewPasswordValidAction,\r\n} from './passwordResetModels';\r\n\r\nexport const passwordResetLinkRequested = (result: boolean): SetPasswordResetAction => ({\r\n type: PasswordResetActionTypes.SET_PASSWORD_RESET,\r\n passwordResetRequestCompleted: true,\r\n isSuccess: result,\r\n});\r\n\r\nexport const setPasswordResetResult = (\r\n result: boolean,\r\n errorCode?: PasswordResetErrorCodes\r\n): SetPasswordResetResultAction => ({\r\n type: PasswordResetActionTypes.RESET_PASSWORD_RESULT,\r\n passwordResetSucceeded: result,\r\n errorCode,\r\n});\r\n\r\nexport const setNewPassword = (value: string): SetNewPasswordAction => ({\r\n type: PasswordResetActionTypes.SET_NEW_PASSWORD,\r\n value,\r\n});\r\n\r\nexport const setRepeatNewPassword = (value: string): SetRepeatNewPasswordAction => ({\r\n type: PasswordResetActionTypes.SET_REPEAT_NEW_PASSWORD,\r\n value,\r\n});\r\n\r\nexport const setIsNewPasswordValid = (isValid: boolean): SetIsNewPasswordValidAction => ({\r\n type: PasswordResetActionTypes.SET_IS_NEW_PASSWORD_VALID,\r\n isValid,\r\n});\r\n\r\nexport const setIsRepeatNewPasswordValid = (isValid: boolean): SetIsRepeatNewPasswordValidAction => ({\r\n type: PasswordResetActionTypes.SET_IS_REPEAT_NEW_PASSWORD_VALID,\r\n isValid,\r\n});\r\n\r\nexport const doClearPasswordResetState = (): ClearPasswordResetAction => ({\r\n type: PasswordResetActionTypes.CLEAR_PASSWORD_RESET,\r\n});\r\n","import { MobileOSType } from 'models/app/MobileOSType';\r\n\r\nexport interface RegisterDeviceRequest {\r\n deviceId: string;\r\n mobileOs: MobileOSType;\r\n}\r\n\r\nexport enum RegisterDeviceCmdActionTypes {\r\n SET_DEVICE_ID = 'PUSH_NOTIFICATIONS/REGISTER_DEVICE_CMD/SET_DEVICE_ID',\r\n SET_OS = 'PUSH_NOTIFICATIONS/REGISTER_DEVICE_CMD/SET_OS',\r\n}\r\n\r\nexport interface SetOsTypeAction {\r\n type: RegisterDeviceCmdActionTypes.SET_OS;\r\n value: MobileOSType;\r\n}\r\n\r\nexport interface SetDeviceIdAction {\r\n type: RegisterDeviceCmdActionTypes.SET_DEVICE_ID;\r\n value: string;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { PasswordResetActionTypes, PasswordResetState } from '.';\r\n\r\nconst initialState: PasswordResetState = {\r\n newPassword: '',\r\n repeatNewPassword: '',\r\n isNewPasswordValid: false,\r\n isRepeatNewPassword: false,\r\n};\r\n\r\nexport const passwordResetReducer: Reducer = (state = initialState, action: Action) => {\r\n switch (action.type) {\r\n case PasswordResetActionTypes.SET_PASSWORD_RESET:\r\n return {\r\n ...state,\r\n passwordResetRequestCompleted: action.passwordResetRequestCompleted,\r\n requestPasswordResetLinkResult: action.isSuccess,\r\n };\r\n case PasswordResetActionTypes.RESET_PASSWORD_RESULT:\r\n return {\r\n ...initialState,\r\n passwordResetSucceeded: action.passwordResetSucceeded,\r\n passwordResetErrorCode: action.errorCode,\r\n };\r\n case PasswordResetActionTypes.SET_NEW_PASSWORD:\r\n return {\r\n ...state,\r\n newPassword: action.value,\r\n };\r\n case PasswordResetActionTypes.SET_REPEAT_NEW_PASSWORD:\r\n return {\r\n ...state,\r\n repeatNewPassword: action.value,\r\n };\r\n case PasswordResetActionTypes.SET_IS_NEW_PASSWORD_VALID:\r\n return {\r\n ...state,\r\n isNewPasswordValid: action.isValid,\r\n };\r\n case PasswordResetActionTypes.SET_IS_REPEAT_NEW_PASSWORD_VALID:\r\n return {\r\n ...state,\r\n isRepeatNewPassword: action.isValid,\r\n };\r\n case PasswordResetActionTypes.CLEAR_PASSWORD_RESET:\r\n return initialState;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { api } from 'api';\r\nimport { executingCommand, FetchCommandTypes, executingCommandFailed, executedCommand } from 'store/global/fetch';\r\nimport { MobileOSType } from 'models/app/MobileOSType';\r\nimport { RegisterDeviceRequest } from '.';\r\nimport { RootState, Dispatch } from 'store/rootReducer';\r\n\r\nexport const registerDeviceId = (deviceId: string, os: MobileOSType) => (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => {\r\n const state = getState();\r\n if (!state.global.session.userId) {\r\n return;\r\n }\r\n const userId = state.global.session.userId;\r\n const cmdFailed = executingCommandFailed(userId.toString(), FetchCommandTypes.REGISTER_DEVICE_ID);\r\n\r\n dispatch(executingCommand(userId.toString(), FetchCommandTypes.REGISTER_DEVICE_ID));\r\n if (!deviceId) {\r\n dispatch(cmdFailed);\r\n } else {\r\n const payload: RegisterDeviceRequest = {\r\n deviceId,\r\n mobileOs: os,\r\n };\r\n api\r\n .post(`Anvaendare/RegisterDevice`, payload, {\r\n muteErrorNotificationOnStatus: [400, 401],\r\n })\r\n .then(res => {\r\n if (!res.error) {\r\n dispatch(executedCommand(userId.toString(), FetchCommandTypes.REGISTER_DEVICE_ID));\r\n } else {\r\n dispatch(cmdFailed);\r\n }\r\n })\r\n .catch(err => dispatch(cmdFailed));\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { RegisterDeviceCmdState } from '.';\r\n\r\nconst initialState: RegisterDeviceCmdState = {};\r\n\r\nexport const registerDeviceCmdReducer: Reducer = (state = initialState, action: Action) => {\r\n return state;\r\n};\r\n","export enum InitializeActionTypes {\r\n SET_INITIALIZED = 'SET_INITIALIZED',\r\n}\r\n\r\nexport type SetInitializedAction = {\r\n type: InitializeActionTypes.SET_INITIALIZED;\r\n initialized: boolean;\r\n};\r\n\r\nexport type InitializeAction = SetInitializedAction;\r\n","import { combineReducers } from 'redux';\r\nimport { RegisterDeviceCmdState, registerDeviceCmdReducer } from './registerDeviceCmd';\r\n\r\nexport interface PushNotificationsState {\r\n readonly registerDeviceCmd: RegisterDeviceCmdState;\r\n}\r\n\r\nexport const pushNotificationsReducer = combineReducers({\r\n registerDeviceCmd: registerDeviceCmdReducer,\r\n});\r\n","import { combineReducers } from 'redux';\r\nimport { errorsReducer, ErrorsState, ErrorsAction } from './errors';\r\nimport { debugReducer, DebugState, DebugAction } from './debug';\r\nimport { fetchReducer, FetchState, FetchAction } from './fetch';\r\nimport { uiReducer, UIState, UIAction } from './ui';\r\nimport { SessionState, sessionReducer, SessionActions } from './session';\r\nimport { PasswordResetState, passwordResetReducer, PasswordResetActions } from './passwordReset';\r\nimport { DictionaryRootState, DictionaryActions, DictionaryReducer } from './dictionary';\r\nimport { PushNotificationsState, pushNotificationsReducer, PushNotificationsActions } from './pushNotifications';\r\nimport { CalendarState, CalendarActions, calendarReducer } from './calendar';\r\n\r\nexport type GlobalAction =\r\n | ErrorsAction\r\n | DebugAction\r\n | FetchAction\r\n | UIAction\r\n | SessionActions\r\n | PasswordResetActions\r\n | DictionaryActions\r\n | PushNotificationsActions\r\n | CalendarActions;\r\n\r\nexport interface GlobalState {\r\n readonly errors: ErrorsState;\r\n readonly debug: DebugState;\r\n readonly fetch: FetchState;\r\n readonly ui: UIState;\r\n readonly session: SessionState;\r\n readonly passowrdReset: PasswordResetState;\r\n readonly dictionary: DictionaryRootState;\r\n readonly pushNotifications: PushNotificationsState;\r\n readonly calendar: CalendarState;\r\n}\r\n\r\nexport const globalReducer = combineReducers({\r\n errors: errorsReducer,\r\n debug: debugReducer,\r\n fetch: fetchReducer,\r\n ui: uiReducer,\r\n session: sessionReducer,\r\n passowrdReset: passwordResetReducer,\r\n dictionary: DictionaryReducer,\r\n pushNotifications: pushNotificationsReducer,\r\n calendar: calendarReducer,\r\n});\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { ActionType } from './debugActions';\r\n\r\nexport type DebugState = Readonly;\r\n\r\nexport const debugReducer: Reducer = (state = false, action: Action) => {\r\n if (action.type === ActionType.errorFetch) {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const getIsWaitingForError = (state: DebugState) => state;\r\n","import { combineReducers } from 'redux';\r\nimport { InitializeActionTypes, SetInitializedAction } from './initializeActions';\r\nimport { Action } from 'store';\r\n\r\ninterface InitializeState {\r\n initialized: boolean;\r\n}\r\n\r\nexport interface InitializeRootState {\r\n read: InitializeState;\r\n}\r\n\r\nconst initialState: InitializeState = {\r\n initialized: false,\r\n};\r\n\r\nexport const setInitialized = (initialized: boolean): SetInitializedAction => ({\r\n type: InitializeActionTypes.SET_INITIALIZED,\r\n initialized,\r\n});\r\n\r\nexport const reducer = (state: InitializeState = initialState, action: Action): InitializeState => {\r\n switch (action.type) {\r\n case InitializeActionTypes.SET_INITIALIZED:\r\n return { ...state, initialized: action.initialized };\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n\r\nexport const initializeReducer = combineReducers({\r\n read: reducer,\r\n});\r\n","export enum AnlaeggningarReadActionTypes {\r\n ADD_SITECORE_ANLAEGGNINGAR = 'ADD_SITECORE_ANLAEGGNINGAR',\r\n}\r\n\r\nexport type AnlaeggningarReadAction = AddSitecoreAnlaeggningar;\r\n\r\nexport interface AddSitecoreAnlaeggningar {\r\n type: AnlaeggningarReadActionTypes.ADD_SITECORE_ANLAEGGNINGAR;\r\n anlaeggningar: Array;\r\n}\r\n\r\nexport const addSitecoreAnlaeggningar = (\r\n anlaeggningar: Array\r\n): AddSitecoreAnlaeggningar => ({\r\n type: AnlaeggningarReadActionTypes.ADD_SITECORE_ANLAEGGNINGAR,\r\n anlaeggningar,\r\n});\r\n// interface GetAnlaeggningarAction {\r\n// type: 'GET_ANLAEGGNINGAR';\r\n// }\r\n\r\n// export const getAnlaeggningar = (): GetAnlaeggningarAction =>\r\n// ({ type: 'GET_ANLAEGGNINGAR' });\r\n","import { AnlaeggningarReadActionTypes } from '.';\r\nimport { Action } from 'store';\r\nexport interface AnlaeggningarReadState {\r\n anlaeggningar: Array;\r\n sitecoreAnlaeggningar: Array;\r\n}\r\nlet bar = [\r\n { Id: 1, AnlaeggningsId: 123, AnlaeggningsNamn: 'F&S Hornstull' },\r\n { Id: 2, AnlaeggningsId: 124, AnlaeggningsNamn: 'F&S Vasastan' },\r\n { Id: 3, AnlaeggningsId: 125, AnlaeggningsNamn: 'F&S Hagastan' },\r\n { Id: 4, AnlaeggningsId: 126, AnlaeggningsNamn: 'F&S City' },\r\n { Id: 5, AnlaeggningsId: 127, AnlaeggningsNamn: 'F&S Nacka' },\r\n];\r\n\r\nconst initialState: AnlaeggningarReadState = {\r\n anlaeggningar: bar,\r\n sitecoreAnlaeggningar: [],\r\n};\r\n\r\nexport const readReducer = (state: AnlaeggningarReadState = initialState, action: Action): AnlaeggningarReadState => {\r\n switch (action.type) {\r\n case AnlaeggningarReadActionTypes.ADD_SITECORE_ANLAEGGNINGAR:\r\n return { ...state, sitecoreAnlaeggningar: action.anlaeggningar };\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","export enum FoereningActionTypes {\r\n FETCH_BOKNINGREGLER = 'FETCH_BOKNINGREGLER',\r\n ADD_BOKNINGREGLER = 'ADD_BOKNINGREGLER',\r\n ADD_MEDLEMSVILLKOR = 'ADD_MEDLEMSVILLKOR',\r\n ADD_SMS_EMAIL_VILLKOR = 'ADD_SMS_EMAIL_VILLKOR',\r\n ADD_FOERENINGAR = 'ADD_FOERENINGAR',\r\n}\r\n\r\ninterface FetchBokningReglerAction {\r\n type: FoereningActionTypes.FETCH_BOKNINGREGLER;\r\n}\r\n\r\ninterface AddBokningReglerAction {\r\n type: FoereningActionTypes.ADD_BOKNINGREGLER;\r\n text: string;\r\n id: number;\r\n}\r\n\r\ninterface AddMedlemsVillkorAction {\r\n type: FoereningActionTypes.ADD_MEDLEMSVILLKOR;\r\n text: string;\r\n id: number;\r\n}\r\n\r\ninterface AddSmsEmailVillkorAction {\r\n type: FoereningActionTypes.ADD_SMS_EMAIL_VILLKOR;\r\n text: string;\r\n id: number;\r\n}\r\n\r\ninterface AddFoereningarAction {\r\n type: FoereningActionTypes.ADD_FOERENINGAR;\r\n foereningar: fos.api.FoereningBase[];\r\n}\r\n\r\nexport const fetchBokningRegler = (): FetchBokningReglerAction => ({\r\n type: FoereningActionTypes.FETCH_BOKNINGREGLER,\r\n});\r\n\r\nexport const addBokningRegler = (text: string, id: number): AddBokningReglerAction => ({\r\n type: FoereningActionTypes.ADD_BOKNINGREGLER,\r\n text,\r\n id,\r\n});\r\n\r\nexport const addMedlemsVillkor = (text: string, id: number): AddMedlemsVillkorAction => ({\r\n type: FoereningActionTypes.ADD_MEDLEMSVILLKOR,\r\n text,\r\n id,\r\n});\r\n\r\nexport const addSmsAndEmailVillkor = (text: string, id: number): AddSmsEmailVillkorAction => ({\r\n type: FoereningActionTypes.ADD_SMS_EMAIL_VILLKOR,\r\n text,\r\n id,\r\n});\r\n\r\nexport const addFoereningar = (foereningar: fos.api.FoereningBase[]): AddFoereningarAction => ({\r\n type: FoereningActionTypes.ADD_FOERENINGAR,\r\n foereningar,\r\n});\r\n\r\nexport type FoereningarReadAction =\r\n | FetchBokningReglerAction\r\n | AddBokningReglerAction\r\n | AddMedlemsVillkorAction\r\n | AddSmsEmailVillkorAction\r\n | AddFoereningarAction;\r\n","import { combineReducers } from 'redux';\r\nimport { readReducer, AnlaeggningarReadState, AnlaeggningarReadAction } from './read';\r\n\r\nexport type AnlaeggningarAction = AnlaeggningarReadAction;\r\n\r\nexport interface AnlaeggningarRootState {\r\n read: AnlaeggningarReadState;\r\n}\r\n\r\nexport const anlaeggningarReducer = combineReducers({\r\n read: readReducer,\r\n});\r\n","import { constructSafeName } from 'utils/helpers';\r\nimport { addSitecoreAnlaeggningar } from './read/anlaeggningarReadActions';\r\nimport { api } from 'api';\r\nimport { ThunkAction } from 'store';\r\nimport { fetching, FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { fetched, fetchedFailed } from './../global/fetch/fetchActions';\r\n\r\nexport const getSitecoreAnlaeggningar = (\r\n foereningNamn: string,\r\n foereningId: number,\r\n countryId: number\r\n): ThunkAction => async dispatch => {\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.ANLAEGGNINGAR));\r\n try {\r\n const res = await api.get>(\r\n `Foerening/GetAnlaeggningarFromSitecore?foerening=${constructSafeName(foereningNamn)}&countryId=${countryId}`\r\n );\r\n if (!res.error) {\r\n dispatch(addSitecoreAnlaeggningar(res.result));\r\n\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.ANLAEGGNINGAR, res.result));\r\n } else {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.ANLAEGGNINGAR));\r\n }\r\n } catch (error) {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.ANLAEGGNINGAR));\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { readReducer, PassDetailsReadState, PassDetailsReadAction } from './read';\r\n\r\nexport type PassDetailsAction = PassDetailsReadAction;\r\n\r\nexport interface PassDetailsRootState {\r\n read: PassDetailsReadState;\r\n}\r\n\r\nexport const passDetailsReducer = combineReducers({\r\n read: readReducer,\r\n});\r\n","export enum TrainingPreferencesReadActionType {\r\n AddSpecialintressen = 'ADD_SPECIALINTRESSEN',\r\n AddSavedSpecialintressen = 'ADD_SAVED_SPECIALINTRESSEN',\r\n RemoveSavedSpecialintressen = 'REMOVE_SAVED_SPECIALINTRESSE',\r\n AddSavedAnlaeggningar = 'ADD_SAVED_ANLAEGGNINGAR',\r\n RemoveSavedAnlaeggning = 'REMOVE_SAVED_ANLAEGGNING',\r\n}\r\n\r\ninterface AddSpecialintressenReadAction {\r\n type: TrainingPreferencesReadActionType.AddSpecialintressen;\r\n childrenAgeGroups: Array;\r\n workoutlevels: Array;\r\n}\r\n\r\ninterface AddSavedSpecialintressen {\r\n type: TrainingPreferencesReadActionType.AddSavedSpecialintressen;\r\n specialintressen: Array;\r\n}\r\n\r\ninterface RemoveSavedSpecialintresse {\r\n type: TrainingPreferencesReadActionType.RemoveSavedSpecialintressen;\r\n specialintresseId: number;\r\n}\r\n\r\ninterface AddSavedAnlaeggningar {\r\n type: TrainingPreferencesReadActionType.AddSavedAnlaeggningar;\r\n anlaeggningar: Array;\r\n}\r\n\r\ninterface RemoveSavedAnlaeggning {\r\n type: TrainingPreferencesReadActionType.RemoveSavedAnlaeggning;\r\n id: number;\r\n}\r\n\r\nexport const removeSavedSpecialintresse = (specialintresseId: number): RemoveSavedSpecialintresse => ({\r\n type: TrainingPreferencesReadActionType.RemoveSavedSpecialintressen,\r\n specialintresseId,\r\n});\r\n\r\nexport const addSpecialintressen = (\r\n childrenAgeGroups: Array,\r\n workoutlevels: Array\r\n): AddSpecialintressenReadAction => ({\r\n type: TrainingPreferencesReadActionType.AddSpecialintressen,\r\n childrenAgeGroups,\r\n workoutlevels,\r\n});\r\n\r\nexport const addSavedSpecialintressen = (\r\n specialintressen: Array\r\n): AddSavedSpecialintressen => ({\r\n type: TrainingPreferencesReadActionType.AddSavedSpecialintressen,\r\n specialintressen,\r\n});\r\n\r\nexport const addSavedAnlaeggningar = (anlaeggningar: Array): AddSavedAnlaeggningar => ({\r\n type: TrainingPreferencesReadActionType.AddSavedAnlaeggningar,\r\n anlaeggningar,\r\n});\r\n\r\nexport const removeSavedAnlaeggning = (id: number): RemoveSavedAnlaeggning => ({\r\n type: TrainingPreferencesReadActionType.RemoveSavedAnlaeggning,\r\n id,\r\n});\r\n\r\nexport type TrainingPreferencesReadAction =\r\n | AddSpecialintressenReadAction\r\n | AddSavedSpecialintressen\r\n | RemoveSavedSpecialintresse\r\n | AddSavedAnlaeggningar\r\n | RemoveSavedAnlaeggning;\r\n","import { FoereningActionTypes, FoereningarReadAction } from '.';\r\n\r\nexport interface FoereningarReadState {\r\n Foereningar: Array;\r\n}\r\n\r\nexport interface BokningRegler {\r\n RuleText?: string;\r\n}\r\nexport interface MedlemsVillkor {\r\n MedlemsVillkor?: string;\r\n SmsEmailVillkor?: string;\r\n}\r\n\r\nexport type FoereningInternal = fos.api.FoereningBase & BokningRegler & MedlemsVillkor;\r\n\r\nconst initialState: FoereningarReadState = {\r\n Foereningar: [],\r\n};\r\n\r\nexport const readReducer = (\r\n state: FoereningarReadState = initialState,\r\n action: FoereningarReadAction\r\n): FoereningarReadState => {\r\n switch (action.type) {\r\n case FoereningActionTypes.ADD_FOERENINGAR:\r\n return {\r\n ...state,\r\n Foereningar: action.foereningar,\r\n };\r\n case FoereningActionTypes.ADD_BOKNINGREGLER:\r\n return {\r\n ...state,\r\n Foereningar: state.Foereningar.map(i =>\r\n i.Id.toString() === action.id.toString()\r\n ? {\r\n ...i,\r\n RuleText: action.text,\r\n }\r\n : { ...i }\r\n ),\r\n };\r\n case FoereningActionTypes.ADD_MEDLEMSVILLKOR:\r\n return {\r\n ...state,\r\n Foereningar: state.Foereningar.map(i =>\r\n i.Id.toString() === action.id.toString()\r\n ? {\r\n ...i,\r\n MedlemsVillkor: action.text,\r\n }\r\n : { ...i }\r\n ),\r\n };\r\n case FoereningActionTypes.ADD_SMS_EMAIL_VILLKOR:\r\n return {\r\n ...state,\r\n Foereningar: state.Foereningar.map(i =>\r\n i.Id.toString() === action.id.toString()\r\n ? {\r\n ...i,\r\n SmsEmailVillkor: action.text,\r\n }\r\n : { ...i }\r\n ),\r\n };\r\n default:\r\n return { ...state };\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { readReducer, FoereningarReadState, FoereningarReadAction } from './read';\r\n\r\nexport type FoereningarAction = FoereningarReadAction;\r\n\r\nexport interface FoereningarRootState {\r\n read: FoereningarReadState;\r\n}\r\n\r\nexport const FoereningarReducer = combineReducers({\r\n read: readReducer,\r\n});\r\n","import { Dispatch, Action } from 'redux';\r\nimport { RootState, ThunkAction } from 'store';\r\nimport { BokningRegler, addMedlemsVillkor, addFoereningar, addSmsAndEmailVillkor } from './read';\r\nimport { api } from 'api';\r\nimport { addBokningRegler } from './read';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from 'store/global/fetch';\r\nimport { constructSafeName } from 'utils';\r\nimport { updateFoereningId } from 'store/auth/loginCmd';\r\n\r\nconst LAST_KNOWN_FOERENING_STORAGE_KEY: string = 'LAST_KNOWN_FOERENING';\r\n\r\nexport const fetchReglerIfNotInStore = (foereningId: number) => async (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => {\r\n let state = getState();\r\n let foerening = state.foereningar.read.Foereningar.find(f => foereningId.toString() === f.Id.toString());\r\n if (foerening) {\r\n const res = await api.get('Bokning/Rules?foerening=' + constructSafeName(foerening.Namn), {\r\n muteErrorNotificationOnStatus: [404],\r\n });\r\n if (!res.error) {\r\n if (res.result.RuleText) {\r\n dispatch(addBokningRegler(res.result.RuleText, foereningId));\r\n } else {\r\n dispatch(addBokningRegler('Inga regler hittade', foereningId));\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const getMedlemsVillkor = (foereningNamn: string, foereningId: number): ThunkAction => async dispatch => {\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.MEDLEM_VILLKOR));\r\n try {\r\n const res = await api.get(\r\n `Abonnemang/GetSubscriptionRules?foereningNamn=${constructSafeName(foereningNamn)}`,\r\n {\r\n muteErrorNotificationOnStatus: [404],\r\n }\r\n );\r\n if (!res.error) {\r\n dispatch(addMedlemsVillkor(res.result.RuleText as string, foereningId));\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.MEDLEM_VILLKOR, res.result));\r\n } else {\r\n dispatch(addMedlemsVillkor('', foereningId));\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.MEDLEM_VILLKOR));\r\n }\r\n } catch (error) {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.MEDLEM_VILLKOR));\r\n }\r\n};\r\n\r\nexport const getSmsEmailVillkor = (foereningNamn: string, foereningId: number): ThunkAction => async dispatch => {\r\n dispatch(fetching(foereningId, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR));\r\n try {\r\n const res = await api.get(\r\n `Abonnemang/GetSmsAndEmailRules?foereningNamn=${constructSafeName(foereningNamn)}`,\r\n {\r\n muteErrorNotificationOnStatus: [404],\r\n }\r\n );\r\n if (!res.error) {\r\n dispatch(addSmsAndEmailVillkor(res.result.RuleText as string, foereningId));\r\n dispatch(fetched(foereningId, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR, res.result));\r\n } else {\r\n dispatch(addSmsAndEmailVillkor('', foereningId));\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR));\r\n }\r\n } catch (error) {\r\n dispatch(fetchedFailed(foereningId, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR));\r\n }\r\n};\r\n\r\nexport const getFoereningar = (all: boolean): ThunkAction => async dispatch => {\r\n dispatch(fetching(-1, FetchStatusAggregateTypes.GET_FOERENINGAR));\r\n try {\r\n const foereningarUrl = all ? `Foerening/GetAllFoereningar` : `Foerening/GetFoereningar`;\r\n const res = await api.get(foereningarUrl, {\r\n anonymousCall: true,\r\n });\r\n if (!res.error) {\r\n dispatch(addFoereningar(res.result));\r\n const lastKnownFoerening = localStorage.getItem(LAST_KNOWN_FOERENING_STORAGE_KEY);\r\n if (!!lastKnownFoerening && lastKnownFoerening !== '') {\r\n const foerening = res.result.find(f => f.Id.toString() === lastKnownFoerening.toString());\r\n if (foerening) {\r\n dispatch(updateFoereningId(foerening.Id));\r\n }\r\n }\r\n\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.GET_FOERENINGAR, res.result));\r\n } else {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.GET_FOERENINGAR));\r\n }\r\n } catch (error) {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.GET_FOERENINGAR));\r\n }\r\n};\r\n","interface RemoveWorkoutLevelWriteAction {\r\n type: TrainingPreferencesWriteActionType.RemoveWorkoutLevel;\r\n workoutLevel: string;\r\n}\r\n\r\ninterface AddWorkoutLevelWriteAction {\r\n type: TrainingPreferencesWriteActionType.AddWorkoutLevel;\r\n workoutLevel: string;\r\n}\r\n\r\ninterface AddChildAgeGroupWriteAction {\r\n type: TrainingPreferencesWriteActionType.AddChildAgeGroup;\r\n childAgeGroup: string;\r\n}\r\n\r\ninterface RemoveChildGroupWriteAction {\r\n type: TrainingPreferencesWriteActionType.RemoveChildAgeGroup;\r\n childAgeGroup: string;\r\n}\r\n\r\ninterface RemoveSpecialintresseAction {\r\n type: TrainingPreferencesWriteActionType.RemoveSpecialintresse;\r\n}\r\n\r\ninterface AddFavoriteAnlaeggningWriteAction {\r\n type: TrainingPreferencesWriteActionType.AddFavoriteAnlaeggning;\r\n favoriteAnlaeggning: string;\r\n}\r\n\r\ninterface RemoveFavoriteAnlaeggningarWriteAction {\r\n type: TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggningar;\r\n}\r\n\r\ninterface RemoveFavoriteAnlaeggningWriteAction {\r\n type: TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggning;\r\n anlaeggning: string;\r\n}\r\n\r\nexport type TrainingPreferencesWriteAction =\r\n | RemoveWorkoutLevelWriteAction\r\n | AddWorkoutLevelWriteAction\r\n | RemoveChildGroupWriteAction\r\n | AddChildAgeGroupWriteAction\r\n | RemoveSpecialintresseAction\r\n | RemoveFavoriteAnlaeggningarWriteAction\r\n | AddFavoriteAnlaeggningWriteAction\r\n | RemoveFavoriteAnlaeggningWriteAction;\r\n\r\nexport enum TrainingPreferencesWriteActionType {\r\n RemoveWorkoutLevel = 'REMOVE_WORKOUTLEVEL',\r\n AddWorkoutLevel = 'ADD_WORKOUTLEVEL',\r\n RemoveChildAgeGroup = 'REMOVE_CHILD_AGE_GROUP',\r\n AddChildAgeGroup = 'ADD_CHILD_AGE_GROUP',\r\n RemoveSpecialintresse = 'REMOVE_PREFERENCES',\r\n AddFavoriteAnlaeggning = 'ADD_FAVORITE_ANLAEGGNING',\r\n RemoveFavoriteAnlaeggningar = 'REMOVE_FAVORITE_ANLAEGGNINGAR',\r\n RemoveFavoriteAnlaeggning = 'REMOVE_FAVORITE_ANLAEGGNING',\r\n}\r\n\r\nexport const addWorkoutLevel = (workoutLevel: string): AddWorkoutLevelWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.AddWorkoutLevel,\r\n workoutLevel,\r\n});\r\n\r\nexport const removeWorkoutLevel = (workoutLevel: string): RemoveWorkoutLevelWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.RemoveWorkoutLevel,\r\n workoutLevel,\r\n});\r\n\r\nexport const removeChildAgeGroup = (childAgeGroup: string): RemoveChildGroupWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.RemoveChildAgeGroup,\r\n childAgeGroup,\r\n});\r\n\r\nexport const addChildAgeGroup = (childAgeGroup: string): AddChildAgeGroupWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.AddChildAgeGroup,\r\n childAgeGroup,\r\n});\r\n\r\nexport const removeSpecialintressen = (): RemoveSpecialintresseAction => ({\r\n type: TrainingPreferencesWriteActionType.RemoveSpecialintresse,\r\n});\r\n\r\nexport const addFavoriteAnlaeggning = (favoriteAnlaeggning: string): AddFavoriteAnlaeggningWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.AddFavoriteAnlaeggning,\r\n favoriteAnlaeggning,\r\n});\r\n\r\nexport const removeFavoriteAnlaeggningar = (): RemoveFavoriteAnlaeggningarWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggningar,\r\n});\r\n\r\nexport const removeFavoriteAnlaeggning = (anlaeggning: string): RemoveFavoriteAnlaeggningWriteAction => ({\r\n type: TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggning,\r\n anlaeggning,\r\n});\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { TrainingPreferencesReadActionType } from './trainingPreferencesReadActions';\r\n\r\nexport interface TrainingPreferencesReadState {\r\n childrenAgeGroups: Array;\r\n workoutlevels: Array;\r\n savedSpecialintressen: Array;\r\n anlaeggningar: Array;\r\n}\r\n\r\nconst initialState: TrainingPreferencesReadState = {\r\n savedSpecialintressen: [],\r\n childrenAgeGroups: [],\r\n workoutlevels: [],\r\n anlaeggningar: [],\r\n};\r\n\r\nexport const trainingPreferencesReadReducer: Reducer = (\r\n state = initialState,\r\n action: Action\r\n) => {\r\n switch (action.type) {\r\n case TrainingPreferencesReadActionType.AddSpecialintressen:\r\n return { ...state, childrenAgeGroups: action.childrenAgeGroups, workoutlevels: action.workoutlevels };\r\n\r\n case TrainingPreferencesReadActionType.AddSavedSpecialintressen:\r\n return { ...state, savedSpecialintressen: action.specialintressen };\r\n\r\n case TrainingPreferencesReadActionType.RemoveSavedSpecialintressen:\r\n return {\r\n ...state,\r\n savedSpecialintressen: state.savedSpecialintressen.filter(\r\n i => i.SpecialintresseId !== action.specialintresseId\r\n ),\r\n };\r\n\r\n case TrainingPreferencesReadActionType.AddSavedAnlaeggningar:\r\n return { ...state, anlaeggningar: action.anlaeggningar };\r\n\r\n case TrainingPreferencesReadActionType.RemoveSavedAnlaeggning:\r\n return { ...state, anlaeggningar: state.anlaeggningar.filter(i => i.SpecialintresseId !== action.id) };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","interface GetMedlemskapOchKortAction {\r\n type: MedlemskapOchKortReadActionType.GetMedlemskapOchKort;\r\n abonnemang?: fos.api.Abonnemang;\r\n}\r\n\r\ninterface ClearMedlemskapOchKortAction {\r\n type: MedlemskapOchKortReadActionType.ClearMedlemskapOchKort;\r\n}\r\n\r\nexport type MedlemskapOchKortReadActions = GetMedlemskapOchKortAction | ClearMedlemskapOchKortAction;\r\n\r\nexport enum MedlemskapOchKortReadActionType {\r\n GetMedlemskapOchKort = 'GET_MEDLEMSKAP_OCH_KORT',\r\n ClearMedlemskapOchKort = 'CLEAR_MEDLEMSKAP_OCH_KORT',\r\n}\r\n\r\nexport const getMedlemskapOchKort = (abonnemang?: fos.api.Abonnemang): MedlemskapOchKortReadActions => ({\r\n type: MedlemskapOchKortReadActionType.GetMedlemskapOchKort,\r\n abonnemang,\r\n});\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { TrainingPreferencesWriteActionType } from './trainingPreferencesWriteActions';\r\n\r\nexport interface TrainingPreferencesWriteState {\r\n workoutLevels: Array;\r\n childAgeGroups: Array;\r\n favoriteAnlaeggningar: Array;\r\n}\r\n\r\nconst initialState: TrainingPreferencesWriteState = {\r\n workoutLevels: [],\r\n childAgeGroups: [],\r\n favoriteAnlaeggningar: [],\r\n};\r\n\r\nexport const trainingPreferencesWriteReducer: Reducer = (\r\n state = initialState,\r\n action: Action\r\n): TrainingPreferencesWriteState => {\r\n switch (action.type) {\r\n case TrainingPreferencesWriteActionType.RemoveWorkoutLevel:\r\n return { ...state, workoutLevels: state.workoutLevels.filter(i => i !== action.workoutLevel) };\r\n\r\n case TrainingPreferencesWriteActionType.AddWorkoutLevel:\r\n return { ...state, workoutLevels: [...state.workoutLevels, action.workoutLevel] };\r\n\r\n case TrainingPreferencesWriteActionType.RemoveChildAgeGroup:\r\n return { ...state, childAgeGroups: state.childAgeGroups.filter(i => i !== action.childAgeGroup) };\r\n\r\n case TrainingPreferencesWriteActionType.AddChildAgeGroup:\r\n return { ...state, childAgeGroups: [...state.childAgeGroups, action.childAgeGroup] };\r\n\r\n case TrainingPreferencesWriteActionType.RemoveSpecialintresse:\r\n return { ...state, childAgeGroups: [], workoutLevels: [] };\r\n\r\n case TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggningar:\r\n return { ...state, favoriteAnlaeggningar: [] };\r\n\r\n case TrainingPreferencesWriteActionType.RemoveFavoriteAnlaeggning:\r\n return { ...state, favoriteAnlaeggningar: state.favoriteAnlaeggningar.filter(i => i !== action.anlaeggning) };\r\n\r\n case TrainingPreferencesWriteActionType.AddFavoriteAnlaeggning:\r\n return { ...state, favoriteAnlaeggningar: [...state.favoriteAnlaeggningar, action.favoriteAnlaeggning] };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\n\r\nimport { trainingPreferencesReadReducer, TrainingPreferencesReadState, TrainingPreferencesReadAction } from './read';\r\n\r\nimport {\r\n trainingPreferencesWriteReducer,\r\n TrainingPreferencesWriteState,\r\n TrainingPreferencesWriteAction,\r\n} from './write';\r\n\r\nexport type TrainingPreferencesAction = TrainingPreferencesReadAction | TrainingPreferencesWriteAction;\r\n\r\nexport interface TrainingPreferencesRootState {\r\n read: TrainingPreferencesReadState;\r\n write: TrainingPreferencesWriteState;\r\n}\r\n\r\nexport const TrainingPreferencesReducer = combineReducers({\r\n read: trainingPreferencesReadReducer,\r\n write: trainingPreferencesWriteReducer,\r\n});\r\n","import {\r\n addSpecialintressen,\r\n addSavedSpecialintressen,\r\n removeSavedSpecialintresse,\r\n addSavedAnlaeggningar,\r\n removeSavedAnlaeggning,\r\n} from './read/trainingPreferencesReadActions';\r\nimport { api } from 'api';\r\nimport { ThunkAction, RootState } from 'store/rootReducer';\r\nimport { getActiveFoerening } from 'utils';\r\n\r\nexport interface SpecialIntressen {\r\n childAgeGroups: Array;\r\n workoutLevels: Array;\r\n}\r\n\r\nexport interface UpdateSpecialIntressenRequest extends SpecialIntressen {\r\n userId: number;\r\n}\r\n\r\nexport const getSpecialIntressen = (): ThunkAction => dispatch => {\r\n const promise = api.get('Settings/GetSpecialIntressen');\r\n\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(addSpecialintressen(result.result.childAgeGroups, result.result.workoutLevels));\r\n }\r\n });\r\n};\r\n\r\nexport const saveSpecialIntressen = (): ThunkAction => (dispatch, getState: () => RootState) => {\r\n const state = getState();\r\n const workoutLevels = state.trainingPreferences.write.workoutLevels;\r\n const childAgeGroups = state.trainingPreferences.write.childAgeGroups;\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n const promise = api.post('Settings/SaveSpecialIntressen', {\r\n childAgeGroups: childAgeGroups,\r\n workoutLevels: workoutLevels,\r\n userId: userId,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(getSavedSpecialIntressen());\r\n }\r\n });\r\n};\r\n\r\nexport const getSavedSpecialIntressen = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n const promise = api.get>('Settings/GetSavedSpecialIntressen?userId=' + userId);\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(addSavedSpecialintressen(result.result));\r\n }\r\n });\r\n};\r\n\r\nexport const deleteSavedSpecialintresse = (specialintresse: fos.api.SavedSpecialintresse): ThunkAction => (\r\n dispatch,\r\n getState\r\n) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n const promise = api.post('settings/RemoveSpecialintresse', {\r\n UserId: userId,\r\n SpecialintresseId: specialintresse.SpecialintresseId,\r\n });\r\n promise.then(result => {\r\n dispatch(removeSavedSpecialintresse(specialintresse.SpecialintresseId));\r\n });\r\n};\r\n\r\nexport const deleteSavedAnlaeggning = (specialintresse: fos.api.SavedSpecialintresse): ThunkAction => (\r\n dispatch,\r\n getState\r\n) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n const promise = api.post('settings/RemoveFavoriteAnlaeggning', {\r\n UserId: userId,\r\n SpecialintresseId: specialintresse.SpecialintresseId,\r\n });\r\n promise.then(result => {\r\n dispatch(removeSavedAnlaeggning(specialintresse.SpecialintresseId));\r\n });\r\n};\r\n\r\nexport const getSavedAnlaeggningar = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n const promise = api.get>(\r\n 'Settings/GetSavedFavoriteAnlaeggningar?userId=' + userId\r\n );\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(addSavedAnlaeggningar(result.result));\r\n }\r\n });\r\n};\r\n\r\nexport const saveFavoriteAnlaeggningar = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n const activeFoerning = getActiveFoerening(\r\n state.global.session.inloggadeFoereningar,\r\n state.global.session.activeFoerening\r\n );\r\n\r\n const anlaeggningar = state.trainingPreferences.write.favoriteAnlaeggningar;\r\n\r\n if (!userId || !activeFoerning) {\r\n return;\r\n }\r\n\r\n const promise = api.post('Settings/SaveFavoriteAnlaeggningar', { Anlaeggningar: anlaeggningar, UserId: userId });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(getSavedAnlaeggningar());\r\n }\r\n });\r\n};\r\n","interface UpdateAvslutaAbonnemangStatusAction {\r\n type: MedlemskapOchKortWriteActionType.UpdateAvslutaAbonnemangStatusAction;\r\n abonnemangId: number;\r\n message: string;\r\n key: string;\r\n endDate?: Date;\r\n}\r\n\r\nexport type MedlemskapOchKortWriteAction = UpdateAvslutaAbonnemangStatusAction;\r\n\r\nexport enum MedlemskapOchKortWriteActionType {\r\n UpdateAvslutaAbonnemangStatusAction = 'UPDATE_AVSLUTA_ABONNEMANG_UI',\r\n}\r\n\r\nexport const updateAvslutaAbonnemangStatus = (\r\n abonnemangId: number,\r\n message: string,\r\n key: string,\r\n endDate?: Date\r\n): UpdateAvslutaAbonnemangStatusAction => ({\r\n type: MedlemskapOchKortWriteActionType.UpdateAvslutaAbonnemangStatusAction,\r\n abonnemangId: abonnemangId,\r\n message: message,\r\n key: key,\r\n endDate: endDate,\r\n});\r\n","export enum AffaerssytemType {\r\n B = '1',\r\n P = '2',\r\n}\r\n\r\nexport enum P_RESULTCODE {\r\n OK = 'OK',\r\n CANCEL = 'CANCEL',\r\n ERROR = 'ERROR',\r\n}\r\n\r\nexport interface PaymentResult {\r\n type: AffaerssytemType;\r\n fid: string;\r\n error?: string;\r\n RESULTCODE?: P_RESULTCODE;\r\n orderid?: string;\r\n receiptid?: string;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { MedlemskapOchKortReadActionType } from './medlemskapOchKortReadActions';\r\nimport { MedlemskapOchKortWriteActionType } from '../write';\r\n\r\nexport interface MedlemskapOchKortReadState {\r\n Abonnemang?: fos.api.Abonnemang;\r\n}\r\n\r\nconst initialState: MedlemskapOchKortReadState = {};\r\n\r\nlet cachedAbonnemangArray: fos.api.Traeningskort[] = [];\r\n\r\nexport const MedlemskapOchKortReadReducer: Reducer = (\r\n state = initialState,\r\n action: Action\r\n): MedlemskapOchKortReadState => {\r\n switch (action.type) {\r\n case MedlemskapOchKortReadActionType.GetMedlemskapOchKort:\r\n return {\r\n Abonnemang: action.abonnemang,\r\n };\r\n case MedlemskapOchKortReadActionType.ClearMedlemskapOchKort:\r\n return initialState;\r\n case MedlemskapOchKortWriteActionType.UpdateAvslutaAbonnemangStatusAction:\r\n if (state.Abonnemang) {\r\n let newState: Array = state.Abonnemang.TraeningskortLista.map(t => {\r\n if (t.Id !== action.abonnemangId) {\r\n return t;\r\n } else if (action.endDate) {\r\n return { ...t, StatusMessage: action.message, Slutdatum: action.endDate, IsTerminateEnabled: false };\r\n } else {\r\n return { ...t, StatusMessage: action.message };\r\n }\r\n });\r\n cachedAbonnemangArray = newState;\r\n return {\r\n ...state,\r\n Abonnemang: {\r\n ...state.Abonnemang,\r\n TraeningskortLista: cachedAbonnemangArray,\r\n },\r\n };\r\n }\r\n return state;\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { MedlemskapOchKortReadActions, MedlemskapOchKortReadReducer, MedlemskapOchKortReadState } from './read';\r\nimport { MedlemskapOchKortWriteAction } from './write';\r\n\r\nexport type MedlemskapOchKortActions = MedlemskapOchKortReadActions | MedlemskapOchKortWriteAction;\r\n\r\nexport interface MedlemskapOchKortRootState {\r\n read: MedlemskapOchKortReadState;\r\n}\r\n\r\nexport const MedlemskapOchKortReducer = combineReducers({\r\n read: MedlemskapOchKortReadReducer,\r\n});\r\n","import {\r\n setSignatureCasesAction,\r\n setPaymentMethodsAction,\r\n setReceiptAction,\r\n setOrderIdAction,\r\n setReceiptInfosAction,\r\n} from './read/paymentReadActions';\r\nimport { fetching, FetchStatusAggregateTypes, fetchedFailed, fetched } from 'store/global/fetch';\r\nimport { onBasketPurchaseError } from './../basket/basketActions';\r\nimport { ThunkAction } from 'store';\r\n\r\nimport { LocationActionTypes, redirectTo } from 'store/location';\r\nimport { PaymentResult, P_RESULTCODE, AffaerssytemType } from '.';\r\nimport { getPaymentSuccededAction } from './read';\r\nimport { deleteBasket, createBasket } from 'store/basket';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { api } from 'api';\r\nimport { setOrderId } from 'store/global/session';\r\n\r\nexport const processPaymentResult =\r\n (result: PaymentResult): ThunkAction =>\r\n (dispatch, getState) => {\r\n const state = getState();\r\n const fid = parseInt(result.fid, 10);\r\n // If we have a shopping basket in the state for another förening so we must to change to the current one\r\n if (result && state.shoppingBasket.foereningId && state.shoppingBasket.foereningId.toString() !== result.fid) {\r\n dispatch(createBasket(fid));\r\n }\r\n if (!result || (!result.error && (!result.RESULTCODE || result.RESULTCODE === P_RESULTCODE.OK))) {\r\n // Delete the basket\r\n const inloggadeFoerening =\r\n state.shoppingBasket && state.shoppingBasket.foereningId ? state.shoppingBasket.foereningId : null;\r\n if (inloggadeFoerening) {\r\n dispatch(deleteBasket(inloggadeFoerening));\r\n localStorage.removeItem('ORDER::' + inloggadeFoerening);\r\n dispatch(setOrderId(undefined));\r\n }\r\n\r\n if (result.orderid) {\r\n dispatch(setOrderIdAction(parseInt(result.orderid, 10)));\r\n }\r\n if (result.orderid && result.type === AffaerssytemType.B) {\r\n dispatch>>(\r\n getSignatureCases(fid, result.orderid)\r\n ).then(res => dispatch(getPaymentSuccededAction()));\r\n } else {\r\n dispatch(getPaymentSuccededAction());\r\n }\r\n } else {\r\n const error: string =\r\n result && result.error ? result.error.toString() : result.RESULTCODE ? result.RESULTCODE : '';\r\n if (error && error !== '') {\r\n dispatch(onBasketPurchaseError(error));\r\n }\r\n dispatch(redirectTo(LocationActionTypes.ShoppingBasket));\r\n }\r\n };\r\n\r\nexport const removeSignatureCase =\r\n (signatureCase: fos.api.SignatureCase): ThunkAction =>\r\n (dispatch, getState) => {\r\n const state = getState();\r\n if (!state.payment.read.signatureCases) {\r\n return;\r\n }\r\n const signatureCases = state.payment.read.signatureCases.filter(sc => sc.Id !== signatureCase.Id);\r\n dispatch(setSignatureCasesAction(signatureCases));\r\n };\r\n\r\nexport const getSignatureCases =\r\n (foereningId: number, orderId: string): ThunkAction =>\r\n dispatch => {\r\n dispatch(fetching(orderId, FetchStatusAggregateTypes.SIGNATURECASE));\r\n const promise = api.get(\r\n `SignatureCases/GetSignatureCasesByOrder?foereningId=${foereningId}&orderId=${orderId}`\r\n );\r\n promise\r\n .then(res => {\r\n if (res.error) {\r\n dispatch(fetchedFailed(orderId, FetchStatusAggregateTypes.SIGNATURECASE));\r\n } else {\r\n dispatch(setSignatureCasesAction(res.result));\r\n dispatch(fetched(orderId, FetchStatusAggregateTypes.SIGNATURECASE, res.result));\r\n }\r\n })\r\n .catch(err => dispatch(fetchedFailed(orderId, FetchStatusAggregateTypes.SIGNATURECASE)));\r\n return promise;\r\n };\r\n\r\nexport const getPaymentMethods =\r\n (foereningId: number, orderId: number): ThunkAction =>\r\n dispatch => {\r\n dispatch(fetching('' + foereningId, FetchStatusAggregateTypes.GET_PAYMENT_METHODS));\r\n\r\n const url = `Foerening/GetPaymentMethods?foereningId=${foereningId}&orderId=${orderId}`;\r\n const res = api.get(url);\r\n res.then(result => {\r\n if (!result.error) {\r\n dispatch(setPaymentMethodsAction(result.result));\r\n dispatch(fetched('' + foereningId, FetchStatusAggregateTypes.GET_PAYMENT_METHODS, result.result));\r\n } else {\r\n dispatch(fetchedFailed('' + foereningId, FetchStatusAggregateTypes.GET_PAYMENT_METHODS));\r\n }\r\n });\r\n };\r\n\r\nexport const getReceipt =\r\n (receiptId: number, foereningId: number): ThunkAction =>\r\n dispatch => {\r\n dispatch(fetching('' + receiptId, FetchStatusAggregateTypes.GET_RECEIPT));\r\n\r\n const url = `Anvaendare/GetReceipt/${receiptId}?foereningId=${foereningId}`;\r\n const res = api.get(url);\r\n res.then(result => {\r\n if (!result.error) {\r\n dispatch(setReceiptAction(result.result));\r\n dispatch(fetched('' + receiptId, FetchStatusAggregateTypes.GET_RECEIPT, result.result));\r\n } else {\r\n dispatch(fetchedFailed('' + receiptId, FetchStatusAggregateTypes.GET_RECEIPT));\r\n }\r\n });\r\n };\r\n\r\nexport const getReceiptForOrder =\r\n (orderId: number, foereningId: number): ThunkAction =>\r\n dispatch => {\r\n dispatch(fetching('order' + orderId, FetchStatusAggregateTypes.GET_RECEIPT));\r\n\r\n const url = `Anvaendare/GetReceiptForOrder/${orderId}?foereningId=${foereningId}`;\r\n const res = api.get(url);\r\n res.then(result => {\r\n if (!result.error) {\r\n dispatch(setReceiptAction(result.result));\r\n dispatch(fetched('order' + orderId, FetchStatusAggregateTypes.GET_RECEIPT, result.result));\r\n } else {\r\n dispatch(fetchedFailed('order' + orderId, FetchStatusAggregateTypes.GET_RECEIPT));\r\n }\r\n });\r\n };\r\n\r\nexport const getReceiptInfos =\r\n (foereningId: number): ThunkAction =>\r\n dispatch => {\r\n dispatch(fetching(-1, FetchStatusAggregateTypes.RECEIPT_INFOS));\r\n const url = `Anvaendare/GetReceiptInfos?foereningId=${foereningId}`;\r\n const res = api.get(url);\r\n res.then(result => {\r\n if (!result.error) {\r\n dispatch(setReceiptInfosAction(result.result));\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.RECEIPT_INFOS, result.result));\r\n } else {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.RECEIPT_INFOS));\r\n }\r\n });\r\n };\r\n","interface GetTraeningsstatistikAction {\r\n type: StatisticsReadActionType.GetTraeningsstatistik;\r\n statistics: fos.api.TrainingStatistics;\r\n}\r\n\r\nexport type StatisticsReadActions = GetTraeningsstatistikAction;\r\n\r\nexport enum StatisticsReadActionType {\r\n GetTraeningsstatistik = 'GET_TRAENINGSSTATISTIK',\r\n}\r\n\r\nexport const getTraeningsstatistik = (statistics: fos.api.TrainingStatistics): StatisticsReadActions => ({\r\n type: StatisticsReadActionType.GetTraeningsstatistik,\r\n statistics,\r\n});\r\n","import { combineReducers } from 'redux';\r\nimport { paymentReadReducer, PaymentReadActions, PaymentReadState } from './read';\r\n\r\nexport type PaymentActions = PaymentReadActions;\r\n\r\nexport interface PaymentRootState {\r\n read: PaymentReadState;\r\n}\r\n\r\nexport const PaymentReducer = combineReducers({\r\n read: paymentReadReducer,\r\n});\r\n","export enum ActionType {\r\n GetNotifications = 'GET_NOTIFICATIONS',\r\n}\r\n\r\nexport interface GetNotificationsAction {\r\n type: ActionType.GetNotifications;\r\n notifications: Array;\r\n}\r\n\r\nexport const getNotifications = (notifications: Array): GetNotificationsAction => ({\r\n type: ActionType.GetNotifications,\r\n notifications,\r\n});\r\n\r\nexport type NotificationsActions = GetNotificationsAction;\r\n","import { Reducer } from 'redux';\r\nimport { Action } from 'store';\r\nimport { StatisticsReadActionType } from './statisticsReadActions';\r\n\r\nexport interface StatisticsReadState {\r\n Statistics: fos.api.TrainingStatistics;\r\n}\r\n\r\nconst initialState: StatisticsReadState = {\r\n Statistics: {\r\n WorkoutsThisWeek: 0,\r\n WorkoutsLastWeek: 0,\r\n WorkoutsThisMonth: 0,\r\n WorkoutsLastMonth: 0,\r\n WorkoutsThisYear: 0,\r\n WorkoutsLastYear: 0,\r\n WorkoutTypesPercentageLast30Days: [],\r\n },\r\n};\r\n\r\nexport const StatisticsReadReducer: Reducer = (\r\n state = initialState,\r\n action: Action\r\n): StatisticsReadState => {\r\n switch (action.type) {\r\n case StatisticsReadActionType.GetTraeningsstatistik:\r\n return {\r\n Statistics: action.statistics,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { StatisticsReadReducer, StatisticsReadActions, StatisticsReadState } from './read';\r\n\r\nexport type StatisticsActions = StatisticsReadActions;\r\n\r\nexport interface StatisticsRootState {\r\n read: StatisticsReadState;\r\n}\r\n\r\nexport const StatisticsReducers = combineReducers({\r\n read: StatisticsReadReducer,\r\n});\r\n","import * as React from 'react';\r\n\r\nexport enum IconCrossColor {\r\n red = 'red',\r\n black = 'black',\r\n gray = 'gray',\r\n}\r\n\r\nconst ColorValues = {\r\n red: '#e31836',\r\n black: '#1D1D1B',\r\n gray: '#d2d2d0',\r\n};\r\n\r\nexport interface IconCrossProps {\r\n color?: IconCrossColor;\r\n title?: string;\r\n}\r\n\r\nexport class IconCross extends React.Component {\r\n // TODO: Fix translation support for text\r\n\r\n getColor(color?: IconCrossColor) {\r\n if (color) {\r\n switch (color) {\r\n case IconCrossColor.red:\r\n return ColorValues.red;\r\n case IconCrossColor.black:\r\n return ColorValues.black;\r\n case IconCrossColor.gray:\r\n return ColorValues.gray;\r\n default:\r\n return ColorValues.black;\r\n }\r\n }\r\n return ColorValues.black;\r\n }\r\n\r\n render() {\r\n const iconColor = this.getColor(this.props.color);\r\n /* tslint:disable */\r\n\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import { Action } from 'store';\r\nimport { ActionType } from './notificationsActions';\r\n\r\nexport interface NotificationsRootState {\r\n notifications: Array;\r\n}\r\n\r\nconst initialState: NotificationsRootState = {\r\n notifications: [],\r\n};\r\n\r\nexport const NotificationsReducer = (state = initialState, action: Action): NotificationsRootState => {\r\n switch (action.type) {\r\n case ActionType.GetNotifications:\r\n return {\r\n ...state,\r\n notifications: action.notifications,\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { ThunkAction } from './../rootReducer';\r\nimport { api } from 'api';\r\nimport { getNotifications } from '.';\r\nimport {\r\n executingCommand,\r\n FetchCommandTypes,\r\n executingCommandFailed,\r\n executedCommand,\r\n fetching,\r\n FetchStatusAggregateTypes,\r\n fetched,\r\n fetchedFailed,\r\n} from 'store/global/fetch';\r\nimport { fetchNewNotificationsCount } from 'store/global/ui/newNotification';\r\n\r\nexport const fetchNotifications = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (state.global.session.userId) {\r\n dispatch(fetching(state.global.session.userId, FetchStatusAggregateTypes.NOTIFICATIONS));\r\n }\r\n\r\n const promise = api.get>('Notis/GetNotiser', {\r\n muteErrorNotificationOnStatus: [400],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(getNotifications(result.result));\r\n if (state.global.session.userId) {\r\n dispatch(markNotificationsAsRead(state.global.session.userId));\r\n dispatch(fetched(state.global.session.userId, FetchStatusAggregateTypes.NOTIFICATIONS, result));\r\n }\r\n } else {\r\n if (state.global.session.userId) {\r\n dispatch(fetchedFailed(state.global.session.userId, FetchStatusAggregateTypes.NOTIFICATIONS));\r\n }\r\n }\r\n dispatch(fetchNewNotificationsCount());\r\n });\r\n return promise;\r\n};\r\n\r\nexport const markNotificationsAsRead = (userid: number): ThunkAction => (dispatch, getState) => {\r\n dispatch(executingCommand(userid.toString(), FetchCommandTypes.MARK_NOTIFICATIONS_AS_READ));\r\n\r\n const promise = api.post('Notis/MarkeraNotiserSomLaest', userid, {\r\n // muteErrorNotificationOnStatus: [400]\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(executedCommand(userid.toString(), FetchCommandTypes.MARK_NOTIFICATIONS_AS_READ));\r\n } else {\r\n dispatch(executingCommandFailed(userid.toString(), FetchCommandTypes.MARK_NOTIFICATIONS_AS_READ));\r\n }\r\n dispatch(fetchNewNotificationsCount());\r\n });\r\n return promise;\r\n};\r\n","import { createStore, applyMiddleware, compose, AnyAction } from 'redux';\r\nimport { connectRoutes, Options } from 'redux-first-router';\r\nimport thunkMiddleware from 'redux-thunk';\r\nimport { rootReducer, RootState } from './store';\r\nimport { routesMap, LocationState } from './store/location';\r\nimport { localeReducer } from './store/global/dictionary';\r\nimport { LocaleState } from 'react-localize-redux';\r\nimport { Reducer } from 'redux';\r\nimport * as queryString from 'query-string';\r\n\r\ndeclare global {\r\n interface Window {\r\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: (e?: E, a?: R) => R;\r\n }\r\n}\r\n\r\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\r\n\r\nexport const configureStore = (initialState?: RootState) => {\r\n const options: Options<{}, RootState> = {\r\n displayConfirmLeave: (confirmLeave: string, callback: (_: boolean) => void) => {\r\n const canLeave = window.confirm(confirmLeave);\r\n\r\n callback(canLeave);\r\n },\r\n querySerializer: queryString,\r\n // Bara för mobilapp version\r\n // https://github.com/ReactTraining/react-router/issues/2161\r\n basename: undefined,\r\n };\r\n\r\n const {\r\n reducer: locationReducer,\r\n middleware: locationMiddleware,\r\n enhancer: locationEnhancer,\r\n } = connectRoutes(routesMap, options);\r\n const l = locationReducer as unknown as Reducer, AnyAction>;\r\n const store = createStore(\r\n rootReducer(l, localeReducer as Reducer),\r\n initialState,\r\n composeEnhancers(locationEnhancer, applyMiddleware(locationMiddleware, thunkMiddleware))\r\n );\r\n\r\n // const rooten = rootReducer(locationReducer, localeReducer as Reducer);\r\n // const middlewares = applyMiddleware(locationMiddleware, thunkMiddleware);\r\n // const comp = compose(locationEnhancer, middlewares);\r\n // const store = createStore(rooten, comp) as StoreEnhancer;\r\n\r\n // const store = createStore(\r\n // rootReducer(locationReducer, localeReducer as Reducer),\r\n // composeEnhancers(\r\n // locationEnhancer,\r\n // applyMiddleware(\r\n // locationMiddleware,\r\n\r\n // // Enable thunk action side effects\r\n // thunkMiddleware\r\n // )\r\n // ) as StoreEnhancer\r\n // );\r\n\r\n return store;\r\n};\r\n","import { Dispatch } from 'store';\r\nimport { ApplicationModeAction } from 'store/global/ui/application-mode/applicationModeActions';\r\n\r\nexport const DESKTOP_MODE_BREAKPOINT = 1000;\r\n\r\nexport interface WindowDimensions {\r\n innerWidth: number;\r\n innerHeight: number;\r\n outerWidth: number;\r\n outerHeight: number;\r\n}\r\n\r\nexport const getDeviceDimensions = (): WindowDimensions => {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n outerWidth: window.outerWidth,\r\n outerHeight: window.outerHeight,\r\n };\r\n};\r\n\r\nexport const setApplicationMode = () => (dispatch: Dispatch) => {\r\n if (getDeviceDimensions().innerWidth > DESKTOP_MODE_BREAKPOINT) {\r\n dispatch({\r\n type: 'UI_APPLICATION_MODE_SET_DESKTOP',\r\n });\r\n } else {\r\n dispatch({\r\n type: 'UI_APPLICATION_MODE_SET_MOBILE',\r\n });\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { appResumeAfterCrash } from 'store/global/errors';\r\nimport { getTranslate, TranslateFunction } from 'react-localize-redux';\r\nimport { RootState } from 'store';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\ntype BluescreenDataProps = Readonly<{\r\n translate: TranslateFunction;\r\n}>;\r\n\r\ntype BluescreenActionProps = Readonly<{\r\n onResumeAfterCrash: () => void;\r\n}>;\r\n\r\ntype BluescreenProps = BluescreenActionProps & BluescreenDataProps;\r\n\r\nexport const Bluescreen: React.SFC = ({ onResumeAfterCrash, translate }) => (\r\n
\r\n
\r\n

{translate(SitecoreDictionary.ErrorPage.AnErrorOccured)}

\r\n
\r\n {/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */}\r\n \r\n {translate(SitecoreDictionary.ErrorPage.ClickHereToRefresh)}\r\n \r\n {/* eslint-enable jsx-a11y/anchor-is-valid, no-script-url */}\r\n
\r\n
\r\n);\r\n\r\nconst mapDispatchToProps: BluescreenActionProps = {\r\n onResumeAfterCrash: appResumeAfterCrash,\r\n};\r\n\r\nconst mapStateToProps = (state: RootState): BluescreenDataProps => ({\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Bluescreen);\r\n","import * as React from 'react';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nimport { ApiError } from 'store/global/errors';\r\n\r\nconst ErrorBubble: React.SFC<{\r\n error: ApiError;\r\n onClose: (error: ApiError) => void;\r\n translate: TranslateFunction;\r\n}> = ({ error, onClose, translate }) => {\r\n // Please check history of this file to restore the ErrorBubble to it's former glory\r\n return null;\r\n};\r\n\r\nexport default ErrorBubble;\r\n","import * as React from 'react';\r\n\r\nimport { ApiError } from 'store/global/errors';\r\nimport ErrorBubble from './ErrorBubble';\r\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\r\n\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface ErrorsProps {\r\n className?: string;\r\n errors?: ReadonlyArray;\r\n onClose: (error: ApiError) => void;\r\n translate: TranslateFunction;\r\n}\r\n\r\nconst Errors: React.SFC = props => (\r\n \r\n {props.errors &&\r\n props.errors.map(error => (\r\n \r\n \r\n \r\n ))}\r\n \r\n);\r\n\r\nexport default Errors;\r\n","import * as React from 'react';\r\n\r\ntype Directions = 'up' | 'down' | 'left' | 'right';\r\n\r\nexport interface IconArrowProps {\r\n color: string;\r\n direction: Directions;\r\n className?: string;\r\n}\r\n\r\nexport const IconArrow: React.SFC = props => {\r\n const getRotation = (direction: Directions) => {\r\n switch (direction.toLowerCase()) {\r\n case 'right':\r\n return 'rotateZ(225deg)';\r\n case 'down':\r\n return 'rotateZ(-45deg)';\r\n case 'left':\r\n return 'rotateZ(45deg)';\r\n case 'up':\r\n return 'rotateZ(135deg)';\r\n default:\r\n return 'rotateZ(45deg)';\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nexport interface IconBigCloseProps {\r\n readonly className?: string;\r\n}\r\n\r\nexport const IconBigClose: React.SFC = props => {\r\n const styles = `\t`;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nexport interface IconCalendarProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconCalendar extends React.Component {\r\n getDate() {\r\n let renderThis = new Date().getDate();\r\n return
{renderThis}
;\r\n }\r\n\r\n // TODO: Fix translation support for text\r\n // https://petercollingridge.appspot.com/svg-optimiser\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n {this.props.title}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.getDate()}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\ninterface IconChrevonProps {\r\n direction?: 'top' | 'right' | 'bottom' | 'left';\r\n title?: string;\r\n color?: 'red';\r\n onClick?: () => void;\r\n}\r\n\r\nexport class IconChevron extends React.Component {\r\n\r\n getClassName() {\r\n let value = 'IconChevron';\r\n if (this.props.direction) {\r\n if (this.props.direction === 'top') {\r\n value += ' IconChevron--top';\r\n } else if (this.props.direction === 'right') {\r\n value += ' IconChevron--right';\r\n } else if (this.props.direction === 'bottom') {\r\n value += ' IconChevron--bottom';\r\n } else if (this.props.direction === 'left') {\r\n value += ' IconChevron--left';\r\n }\r\n }\r\n if (this.props.color) {\r\n if (this.props.color === 'red') {\r\n value += ' IconChevron--red';\r\n }\r\n }\r\n return value;\r\n }\r\n\r\n render() {\r\n return (\r\n /* tslint:disable */\r\n \r\n {this.props.title}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconFilterCalendarViewProps {\r\n active: boolean;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconFilterCalendarView extends React.Component {\r\n inactiveStyle = 'fill: #B6B6B6;';\r\n activeStyle = 'fill: #e31836;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n /* tslint:disable */\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconDropProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconDrop extends React.Component {\r\n render() {\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconFilterListViewProps {\r\n active: boolean;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconFilterListView extends React.Component {\r\n inactiveStyle = 'fill: #B6B6B6;';\r\n activeStyle = 'fill: #e31836;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n /* tslint:disable */\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n {this.props.title} \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport enum IconHeartStyling {\r\n filled = 'filled',\r\n empty = 'empty',\r\n disabled = 'disabled',\r\n}\r\nexport type IconHeartStylingTypes = 'filled' | 'empty' | 'disabled';\r\n\r\nexport interface IconHeartProps {\r\n styling?: IconHeartStylingTypes;\r\n title?: string;\r\n desc?: string;\r\n}\r\n\r\nexport class IconHeart extends React.Component {\r\n // TODO: Fix translation support for text\r\n\r\n getClass(styling?: IconHeartStylingTypes) {\r\n if (!styling) {\r\n return IconHeartStyling.filled;\r\n }\r\n\r\n switch (styling) {\r\n case IconHeartStyling.filled:\r\n return IconHeartStyling.filled;\r\n case IconHeartStyling.empty:\r\n return IconHeartStyling.empty;\r\n case IconHeartStyling.disabled:\r\n return IconHeartStyling.disabled;\r\n default:\r\n return IconHeartStyling.filled;\r\n }\r\n }\r\n\r\n render() {\r\n const styling = this.getClass(this.props.styling);\r\n\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title}\r\n \r\n {this.props.desc}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMyAccountProps {\r\n active: boolean;\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconMyAccount extends React.Component {\r\n // defaultStyle = `stroke: #8B8F92;fill:none;stroke-linecap:round;stroke-linejoin:round;`;\r\n\r\n defaultStyle = `stroke: ${\r\n this.props.color ? this.props.color : '#8B8F92'\r\n };fill:none;stroke-linecap:round;stroke-linejoin:round;`;\r\n activeStyle = 'stroke: #e31836;fill:none;stroke-linecap:round;stroke-linejoin:round;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n {this.props.title}\r\n \r\n {/* tslint:disable */}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconInformationProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconInformation extends React.Component {\r\n render() {\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuArrowProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuArrow extends React.Component {\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuBookedSessionsProps {\r\n title?: string;\r\n color?: string;\r\n}\r\n\r\nexport class IconMenuBookedSessions extends React.Component {\r\n classA = 'fill:white;';\r\n classB = 'fill:#333;';\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n const strokeColor = this.props.color || '#343434';\r\n return (\r\n \r\n {this.props.title}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {/* tslint:disable-next-line:max-line-length */}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuCalendarProps {\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuCalendar extends React.Component {\r\n random = 1 + Math.random() * (1000 - 1);\r\n rand = 'rand-' + Math.round(this.random);\r\n randD = '.rand-' + Math.round(this.random);\r\n\r\n getDate() {\r\n let renderThis = new Date().getDate();\r\n return
{renderThis}
;\r\n }\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n
\r\n \r\n {this.props.title}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
{this.getDate()}
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuFacilityProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuFacility extends React.Component {\r\n fillColour = '#000';\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuFriskisProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuFriskis extends React.Component {\r\n fillColour = '#262626';\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n {/* tslint:disable */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuMembershipProps {\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuMembership extends React.Component {\r\n fillColour = '#000';\r\n\r\n random = 1 + Math.random() * (1000 - 1);\r\n rand = 'rand-' + Math.round(this.random);\r\n randD = '.rand-' + Math.round(this.random);\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuInstallningarProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuInstallningar extends React.Component {\r\n // TODO: Fix translation support for text\r\n\r\n render() {\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuNewsProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuNews extends React.Component {\r\n fillColour = '#000';\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n\r\n {/* tslint:disable-next-line:max-line-length */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuNotificationsProps {\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuNotifications extends React.Component {\r\n fillColour = '#000';\r\n\r\n random = 1 + Math.random() * (1000 - 1);\r\n rand = 'rand-' + Math.round(this.random);\r\n randD = '.rand-' + Math.round(this.random);\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n {/* tslint:disable-next-line:max-line-length */}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuSettingsProps {\r\n title?: string;\r\n color?: string;\r\n}\r\n\r\nexport class IconMenuSettings extends React.Component {\r\n fillColour = '#000';\r\n\r\n random = 1 + Math.random() * (1000 - 1);\r\n rand = 'rand-' + Math.round(this.random);\r\n randD = '.rand-' + Math.round(this.random);\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* tslint:disable-next-line:max-line-length */}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuStatisticsProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuStatistics extends React.Component {\r\n fillColour = '#000';\r\n\r\n // TODO: Fix translation support for text\r\n\r\n render() {\r\n return (\r\n /* tslint:disable */\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuSwitchProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMenuSwitch extends React.Component {\r\n fillColour = '#000';\r\n\r\n // TODO: Fix translation support for text\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n {/* tslint:disable */}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMessageProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconMessage extends React.Component {\r\n render() {\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconProfileProps {\r\n active: boolean;\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconProfile extends React.Component {\r\n // defaultStyle = `stroke: #8B8F92;fill:none;stroke-linecap:round;stroke-linejoin:round;`;\r\n\r\n defaultStyle = `stroke: ${\r\n this.props.color ? this.props.color : '#8B8F92'\r\n };fill:none;stroke-linecap:round;stroke-linejoin:round;`;\r\n activeStyle = 'stroke: #e31836;fill:none;stroke-linecap:round;stroke-linejoin:round;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n \r\n \r\n \r\n {this.props.title}\r\n {/* tslint:disable */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMyWorkoutProps {\r\n active: boolean;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconMyWorkout extends React.Component {\r\n defaultStyle = 'fill:none;stroke:#8B8F92;stroke-linecap:round;stroke-linejoin:round;';\r\n activeStyle = 'fill:none;stroke:#e31836;stroke-linecap:round;stroke-linejoin:round;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n \r\n {this.props.title}\r\n {/* tslint:disable */}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport enum IconRemoveStyling {\r\n red = 'red',\r\n white = 'white',\r\n}\r\nexport type IconRemoveStylingTypes = 'red' | 'white';\r\n\r\nexport interface IconRemoveProps {\r\n styling?: IconRemoveStylingTypes;\r\n title?: string;\r\n desc?: string;\r\n}\r\n\r\nexport class IconRemove extends React.Component {\r\n // TODO: Fix translation support for text\r\n\r\n getClass(styling?: IconRemoveStylingTypes) {\r\n if (!styling) {\r\n return IconRemoveStyling.red;\r\n }\r\n\r\n switch (styling) {\r\n case IconRemoveStyling.red:\r\n return IconRemoveStyling.red;\r\n case IconRemoveStyling.white:\r\n return IconRemoveStyling.white;\r\n default:\r\n return IconRemoveStyling.red;\r\n }\r\n }\r\n\r\n render() {\r\n const styling = this.getClass(this.props.styling);\r\n\r\n /* tslint:disable */\r\n \r\n return (\r\n \r\n {this.props.title}\r\n \r\n {this.props.desc}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconPlayProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconPlay extends React.Component {\r\n render() {\r\n return (\r\n \r\n {this.props.title}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconPlusProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconPlus extends React.Component {\r\n render() {\r\n return (\r\n
\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconMenuCalendarSyncProps {\r\n active: boolean;\r\n color?: string;\r\n title?: string;\r\n}\r\n\r\nenum StatusStyles {\r\n active = 'active',\r\n inactive = 'inactive',\r\n}\r\n\r\nexport class IconMenuCalendarSync extends React.Component {\r\n activeStyle = `stroke: ${\r\n this.props.color ? this.props.color : '#8B8F92'\r\n };fill:none;stroke-linecap:round;stroke-linejoin:round;`;\r\n defaultStyle = 'stroke: #e31836;fill:none;stroke-linecap:round;stroke-linejoin:round;';\r\n\r\n getClassForIcon() {\r\n const iconClass: StatusStyles = this.props.active ? StatusStyles.active : StatusStyles.inactive;\r\n return iconClass;\r\n }\r\n\r\n render() {\r\n // TODO: Fix translation support for text\r\n return (\r\n \r\n {this.props.title}\r\n \r\n {/* tslint:disable */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconPenProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconPen extends React.Component {\r\n render() {\r\n return (\r\n /* tslint:disable */\r\n \r\n {this.props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconCheckMarkProps {\r\n readonly className?: string;\r\n readonly strokeWidth?: number;\r\n readonly selected?: boolean;\r\n title?: string;\r\n}\r\n\r\nexport class IconCheckmark extends React.Component {\r\n strokeWidth: number = this.props.strokeWidth || 1;\r\n\r\n render() {\r\n /* tslint:disable */\r\n return (\r\n \r\n {this.props.title && {this.props.title}}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\ninterface IconKvittoProps {\r\n className?: string;\r\n title?: string;\r\n}\r\n\r\nexport const IconKvitto: React.SFC = (props: IconKvittoProps) => (\r\n \r\n {props.title}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import * as React from 'react';\r\n\r\ninterface IconBookingStatusProps {\r\n extraClassName: string;\r\n}\r\n\r\nexport class IconBookingStatus extends React.Component {\r\n render() {\r\n return
;\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { SettingsLinks } from './SettingsLinks';\r\nimport { SettingBanner } from './SettingsBanner';\r\nimport { MainButton } from '../common';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { isApp } from 'models/app/MobileOSType';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport enum SettingsPages {\r\n Profile,\r\n TrainingPreferences,\r\n PaymentSettings,\r\n AutogiroSettings,\r\n NotificationSettings,\r\n UserAccount,\r\n CalendarSync,\r\n}\r\n\r\nexport interface SettingsLocalProps {\r\n activeSettingsPage?: SettingsPages;\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface SettingsDataProps {\r\n translate: TranslateFunction;\r\n inloggadeFoereningar: fos.api.InloggadeFoerening[];\r\n activeFoereing: number;\r\n settingsPageTitle?: string;\r\n image: string;\r\n shopActive?: boolean;\r\n}\r\n\r\nexport interface SettingsActionProps {\r\n logout: (goToLogin?: boolean, shouldRedirectToPublicWeb?: boolean) => void;\r\n}\r\n\r\ntype SettingsProps = SettingsDataProps & SettingsLocalProps & SettingsActionProps;\r\n\r\nexport const Settings: React.SFC = props => (\r\n
\r\n
\r\n \r\n \r\n
\r\n {\r\n // props.logout(App())\r\n }\r\n
\r\n {\r\n isApp() ? props.logout(true, false) : props.logout(false, true);\r\n }}\r\n />\r\n
\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\nexport interface IconRoundButtonCheckMarkProps {\r\n readonly selected?: boolean;\r\n}\r\n\r\nexport class IconRoundButtonCheckmark extends React.Component {\r\n render() {\r\n return (\r\n
\r\n {this.props.selected && (\r\n \r\n \r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconOnlineWorkoutProps {\r\n title?: string;\r\n}\r\n\r\nexport class IconOnlineWorkout extends React.Component {\r\n defaultStyle = 'fill:none;stroke:#8B8F92;stroke-linecap:round;stroke-linejoin:round;';\r\n activeStyle = 'fill:none;stroke:#e31836;stroke-linecap:round;stroke-linejoin:round;';\r\n\r\n render() {\r\n return (\r\n \r\n \r\n {this.props.title}\r\n {/* tslint:disable */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface SpinnerProps {\r\n appearance?: 'white' | 'red';\r\n alignment?: string;\r\n size?: string;\r\n type?: string;\r\n className?: string;\r\n}\r\n\r\nexport const Spinner: React.SFC = props => (\r\n \r\n);\r\n","import * as React from 'react';\r\nimport { IconPen, IconCross, IconCrossColor, IconCheckmark } from 'components/icons';\r\nimport { Spinner } from './Spinner';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport { ProfilePropertyNameValues } from 'store/global/ui/settings/profile';\r\n\r\nexport interface TextBoxDataProps {\r\n title: string;\r\n value: string;\r\n propertyName: ProfilePropertyNameValues;\r\n enabled: boolean;\r\n alerts?: TextBoxMessagingStatus;\r\n isValid?: boolean;\r\n className?: string;\r\n alwaysHideActions?: boolean;\r\n isWorking?: boolean;\r\n}\r\n\r\nexport interface TextBoxMessagingStatus {\r\n warning?: TextBoxStatusMessage;\r\n error?: TextBoxStatusMessage;\r\n}\r\n\r\nexport interface TextBoxStatusMessage {\r\n show: boolean;\r\n message?: string;\r\n}\r\n\r\nexport interface TextBoxActionProps {\r\n onValueChange: (event: React.ChangeEvent) => void;\r\n activateEditMode: (propertyName: ProfilePropertyNameValues) => void;\r\n onTextBoxClick?: (propertyName: ProfilePropertyNameValues) => void;\r\n onRevertClicked: (propertyName: ProfilePropertyNameValues) => void;\r\n onAcceptClicked: (propertyName: ProfilePropertyNameValues, value: string) => void;\r\n}\r\n\r\ntype TextBoxProps = TextBoxDataProps & TextBoxActionProps;\r\n\r\nexport const TextBox: React.FunctionComponent = ({\r\n title,\r\n value,\r\n propertyName,\r\n enabled,\r\n alerts,\r\n isValid,\r\n className,\r\n alwaysHideActions,\r\n isWorking,\r\n onValueChange,\r\n activateEditMode,\r\n onTextBoxClick,\r\n onRevertClicked,\r\n onAcceptClicked,\r\n}) => {\r\n const onEditClicked = (event: React.SyntheticEvent) => {\r\n activateEditMode(propertyName);\r\n if (onTextBoxClick) {\r\n onTextBoxClick(propertyName);\r\n }\r\n };\r\n\r\n const getTextBoxClass = () => {\r\n let myClass: string;\r\n if (enabled) {\r\n myClass = 'TextBox__InputArea--Unlocked';\r\n } else {\r\n myClass = 'TextBox__InputArea--Locked';\r\n }\r\n if (alerts) {\r\n myClass += ' TextBox__InputArea--error';\r\n }\r\n return myClass;\r\n };\r\n\r\n return (\r\n
\r\n \r\n
onEditClicked(event)}>\r\n onValueChange(event)}\r\n onFocus={event => activateEditMode(propertyName)}\r\n disabled={!enabled || isWorking}\r\n />\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n onRevertClicked(propertyName)}\r\n >\r\n \r\n \r\n onAcceptClicked(propertyName, value)}\r\n >\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {alerts && alerts.warning && alerts.warning.show && (\r\n
{alerts.warning.message}
\r\n )}\r\n {alerts && alerts.error && alerts.error.show && (\r\n
{alerts.error.message}
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\n\r\nimport { PassBookerActionProps, PassBooker, PassBookerExternalDataProps, PassBookerDataProps } from './PassBooker';\r\nimport { bokaPass, BokningResponse } from 'store/pass';\r\nimport { scheduleAvbokaPass } from 'store/bokningar';\r\nimport { FetchCommandTypes, getIsExecuting } from 'store/global/fetch';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\n\r\nconst mapStateToProps = (state: RootState, props: PassBookerExternalDataProps): PassBookerDataProps => {\r\n const isExecuting =\r\n getIsExecuting(state.global.fetch, props.pass.PassId, FetchCommandTypes.BOKA_PASS) ||\r\n getIsExecuting(state.global.fetch, props.pass.PassId, FetchCommandTypes.AVBOKA_PASS);\r\n return {\r\n bokningar: state.bokningar.bokningar,\r\n isExecuting: isExecuting,\r\n\r\n ...props,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: any): PassBookerActionProps => ({\r\n bokaPass: (pass: fos.api.Pass, bokaKoePlats: boolean) => {\r\n return dispatch>>(bokaPass(pass, bokaKoePlats));\r\n },\r\n scheduleAvbokaPass: (payload: fos.api.CancelPayload, passId: string, key: string) => {\r\n return dispatch>>(\r\n scheduleAvbokaPass(payload, passId, key)\r\n );\r\n },\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(PassBooker);\r\n","import { BokningsStatusEnum } from 'models';\r\n\r\nexport const OK_STATUS_CLASS = 'StatusMessage--Green',\r\n ERROR_STATUS_CLASS = 'StatusMessage--Black';\r\nexport const NOT_BOOKABLE_STATUSES = [\r\n BokningsStatusEnum.EJ_BOKNINGSBART_DATE_DROPIN as string,\r\n BokningsStatusEnum.FOERSENT_FOER_ATT_BOKA as string,\r\n BokningsStatusEnum.FOERTIDIGT_FOER_ATT_BOKA as string,\r\n BokningsStatusEnum.FULLT as string,\r\n BokningsStatusEnum.FULLT_DROPIN as string,\r\n BokningsStatusEnum.DROPIN as string,\r\n BokningsStatusEnum.INSTAELLD as string,\r\n];\r\n","import * as React from 'react';\r\nimport { ConfirmationTextBox, IconButton } from 'components/common';\r\nimport { SitecoreDictionary, SitecorePlaceholder, BokningsStatusEnum } from 'models';\r\nimport { OK_STATUS_CLASS, ERROR_STATUS_CLASS } from 'components/pass-details/model';\r\nimport { getDateTextForView } from 'websd/utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { ErrorResult, SuccessResult } from 'websd/utils/configureApi';\r\nimport { BokningResponse } from 'store/pass';\r\n\r\nexport interface PassBookerExternalDataProps {\r\n pass: fos.api.Pass;\r\n shouldShowInfoOnHover: boolean;\r\n translate: TranslateFunction;\r\n onBokatEllerAvbokat: () => void;\r\n}\r\n\r\nexport interface PassBookerInternalDataProps {\r\n bokningar?: Array;\r\n isExecuting: boolean;\r\n}\r\n\r\nexport interface PassBookerActionProps {\r\n bokaPass: (pass: fos.api.Pass, bokaKoePlats: boolean) => Promise>;\r\n scheduleAvbokaPass: (\r\n payload: fos.api.CancelPayload,\r\n passId: string,\r\n key: string\r\n ) => Promise>;\r\n}\r\n\r\nexport type PassBookerDataProps = PassBookerInternalDataProps & PassBookerExternalDataProps;\r\nexport type PassBookerProps = PassBookerDataProps & PassBookerActionProps;\r\n\r\nexport const PassBooker: React.FunctionComponent = ({\r\n bokningar,\r\n translate,\r\n isExecuting,\r\n pass,\r\n shouldShowInfoOnHover,\r\n onBokatEllerAvbokat,\r\n bokaPass,\r\n scheduleAvbokaPass,\r\n}) => {\r\n const [confirmationVisible, setConfirmationVisible] = React.useState(false);\r\n const [isHoveringOnPassBooker, setIsHoveringOnPassBooker] = React.useState(false);\r\n\r\n const avbokaPass = () => {\r\n if (!bokningar) {\r\n return;\r\n }\r\n\r\n let bokning = bokningar.find(b => b.PassId.toString() === pass.PassId.toString());\r\n\r\n if (bokning) {\r\n let payload = {\r\n bokningId: bokning.BokningId.toString(),\r\n foereningsId: bokning.FoereningId,\r\n queued: bokning.Koad,\r\n passId: bokning.PassId,\r\n anlaeggningsId: bokning.AnlaeggningsId,\r\n };\r\n const date = getDateTextForView(pass.StartTime);\r\n scheduleAvbokaPass(payload, pass.PassId, date).then(() => {\r\n onBokatEllerAvbokat();\r\n });\r\n }\r\n setConfirmationVisible(false);\r\n };\r\n\r\n const getConfirmationText = () => {\r\n let confirmationText = translate(SitecoreDictionary.Schedule.ConfirmBook);\r\n if (bokningar) {\r\n if (bokningar.find(b => b.PassId === pass.PassId)) {\r\n confirmationText = translate(SitecoreDictionary.Schedule.ConfirmCancel);\r\n }\r\n }\r\n\r\n confirmationText = confirmationText.toString().replace(SitecorePlaceholder.PASS, pass.PassNamn);\r\n confirmationText = confirmationText.toString().replace(SitecorePlaceholder.FOERENING, pass.AnlaeggningsNamn);\r\n\r\n return confirmationText;\r\n };\r\n\r\n const getIconButtonText = () => {\r\n let bokning = bokningar ? bokningar.find(b => b.PassId.toString() === pass.PassId) : undefined;\r\n let str = '';\r\n\r\n if (!shouldShowInfoOnHover) {\r\n return str;\r\n }\r\n\r\n if (pass.disabled) {\r\n return str;\r\n }\r\n\r\n if (pass.AerInstaelld) {\r\n return `${translate(SitecoreDictionary.Schedule.Messages.CANCELLED)}`;\r\n }\r\n\r\n if (bokning && bokning.Koad) {\r\n str = `${translate(SitecoreDictionary.PassItem.QueuePosition)} ${bokning.KoPlats}`;\r\n } else if (bokning) {\r\n if (pass.AntalLedigaPlatser === 0) {\r\n str = `${pass.AntalIVaenteLista} ${translate(SitecoreDictionary.PassItem.InQueue)}`;\r\n } else {\r\n str = `${pass.AntalLedigaPlatser} ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n }\r\n } else if (pass.BokningStatus === BokningsStatusEnum.DROPIN) {\r\n str = `${pass.AntalDropinPlatser.toString()} drop-in`;\r\n } else if (\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_DROPIN\r\n ) {\r\n str = `${pass.AntalLedigaPlatser} ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n } else if (\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN\r\n ) {\r\n str = `${pass.AntalIVaenteLista} ${translate(SitecoreDictionary.PassItem.InQueue)}`;\r\n }\r\n\r\n if (shouldShowInfoOnHover && isHoveringOnPassBooker && getPassStatus() !== 'NotBooked') {\r\n str = 'Klicka för att avboka';\r\n }\r\n\r\n return str;\r\n };\r\n\r\n const getStatusMessageClass = () => {\r\n if (\r\n pass.statusMessage === SitecoreDictionary.Schedule.Messages.OK_BOOK ||\r\n pass.statusMessage === SitecoreDictionary.Schedule.Messages.QUEUED\r\n ) {\r\n return OK_STATUS_CLASS;\r\n } else {\r\n return ERROR_STATUS_CLASS;\r\n }\r\n };\r\n\r\n const getBookedPass = () => {\r\n return bokningar ? bokningar.find(b => b.PassId === pass.PassId) : undefined;\r\n };\r\n\r\n const getPassStatus = (): 'Booked' | 'NotBooked' | 'Queued' | 'Cancelled' => {\r\n const bookedPass = getBookedPass();\r\n return !bookedPass ? 'NotBooked' : bookedPass.Koad ? 'Queued' : pass.AerInstaelld ? 'Cancelled' : 'Booked';\r\n };\r\n\r\n const getIconButtonStyle = () => {\r\n switch (getPassStatus()) {\r\n case 'Booked':\r\n return '--Booked';\r\n case 'Queued':\r\n return '--BookedWithQueue';\r\n case 'Cancelled':\r\n return '--Cancelled';\r\n default:\r\n switch (pass.BokningStatus) {\r\n case BokningsStatusEnum.EJ_BOKNINGSBART_DATE_DROPIN:\r\n return '--NotAvailableYet';\r\n case BokningsStatusEnum.FOERTIDIGT_FOER_ATT_BOKA:\r\n return '--EarlyToBook';\r\n case BokningsStatusEnum.FOERSENT_FOER_ATT_BOKA:\r\n return '--LateToBook';\r\n case BokningsStatusEnum.BOKNINGSBART:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_DROPIN:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.FULLT || BokningsStatusEnum.FULLT_DROPIN:\r\n return '--MaxCapacity';\r\n case BokningsStatusEnum.DROPIN:\r\n return '--Dropin';\r\n case BokningsStatusEnum.INSTAELLD:\r\n return '--Cancelled';\r\n default:\r\n return '--Available';\r\n }\r\n }\r\n };\r\n\r\n const handleOnClickIconButton = () => {\r\n if (!shouldShowInfoOnHover) {\r\n return;\r\n }\r\n const bookable =\r\n pass.BokningStatus !== BokningsStatusEnum.DROPIN && pass.BokningStatus !== BokningsStatusEnum.INSTAELLD;\r\n if (bokningar && !!bokningar.find(b => b.PassId === pass.PassId)) {\r\n setConfirmationVisible(true);\r\n return;\r\n } else if (bookable) {\r\n const bokaKoePlats =\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN;\r\n bokaPass(pass, bokaKoePlats).then(() => {\r\n onBokatEllerAvbokat();\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
\r\n setIsHoveringOnPassBooker(true)}\r\n onMouseOut={() => setIsHoveringOnPassBooker(false)}\r\n >\r\n handleOnClickIconButton()}\r\n text={getIconButtonText()}\r\n styleType={getIconButtonStyle()}\r\n cssClass={getStatusMessageClass()}\r\n />\r\n
\r\n\r\n {confirmationVisible && (\r\n setConfirmationVisible(false)}\r\n translate={translate}\r\n handleYes={() => avbokaPass()}\r\n text={getConfirmationText()}\r\n />\r\n )}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { IconChevron } from '../icons';\r\nimport { Spinner } from '.';\r\n\r\nexport interface SelectInputOption {\r\n value: string | number;\r\n label: string | number;\r\n isDisabled?: boolean;\r\n}\r\n\r\ninterface SelectInputDataProps {\r\n className?: string;\r\n label?: string;\r\n labelColor?: string;\r\n name?: string;\r\n align?: 'left' | 'center' | 'right';\r\n required?: boolean;\r\n alignLabel?: 'left' | 'center' | 'right';\r\n value?: string | number;\r\n shouldValidate?: boolean;\r\n isValid?: boolean;\r\n options: SelectInputOption[];\r\n theme?: string;\r\n disabled?: boolean;\r\n tabindex?: number;\r\n}\r\n\r\ninterface SelectInputActionProps {\r\n onValueChange?: (newValue: string) => void;\r\n}\r\n\r\ntype SelectInputProps = SelectInputDataProps & SelectInputActionProps;\r\n\r\nexport class SelectInput extends React.Component {\r\n render() {\r\n return this.props.options && this.props.options.length > 1 ? (\r\n
\r\n {this.getLabel()}\r\n
\r\n
\r\n

{this.getValueName()}

\r\n
\r\n
\r\n this.onChange(event)}\r\n disabled={this.props.disabled}\r\n tabIndex={this.props.tabindex}\r\n >\r\n {this.mapOptions()}\r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n ) : (\r\n
\r\n {this.getLabel()}\r\n \r\n
\r\n );\r\n }\r\n private getValueName() {\r\n const value = this.props.options.find(\r\n opt =>\r\n opt.value === this.props.value ||\r\n (!!this.props.value && this.props.value.toString && opt.value.toString() === this.props.value.toString())\r\n );\r\n return value ? value.label : '';\r\n }\r\n private onChange(event: React.ChangeEvent): void {\r\n const newValue: string = event.target.value;\r\n if (this.props.onValueChange) {\r\n this.props.onValueChange(newValue);\r\n }\r\n }\r\n\r\n private mapOptions(): JSX.Element[] {\r\n return this.props.options.map(option => (\r\n \r\n ));\r\n }\r\n\r\n private getValueContainerClasses() {\r\n const mainClass = 'Input__DropDownMenu__Select__ValueContainer';\r\n let classNames = mainClass;\r\n classNames += ` ${this.props.labelColor === 'black' ? `${mainClass}--black` : ''}`;\r\n\r\n switch (this.props.align) {\r\n case 'left':\r\n classNames += ` ${mainClass}--left`;\r\n break;\r\n case 'right':\r\n classNames += ` ${mainClass}--right`;\r\n break;\r\n case 'center':\r\n default:\r\n classNames += ` ${mainClass}--center`;\r\n break;\r\n }\r\n\r\n return classNames;\r\n }\r\n\r\n private getSelectContainerClasses(): string {\r\n let className: string = 'Input__DropDownMenu__Select';\r\n if (this.props.shouldValidate) {\r\n className +=\r\n ' ' + (this.props.isValid ? 'Input__DropDownMenu__Select__Valid' : 'Input__DropDownMenu__Select__UnValid');\r\n }\r\n return className;\r\n }\r\n\r\n private getSelectClasses(): string {\r\n let className: string = 'Input__Select';\r\n switch (this.props.align) {\r\n case 'left':\r\n className += ' Input__Select__Left';\r\n break;\r\n case 'right':\r\n className += ' Input__Select__Right';\r\n break;\r\n case 'center':\r\n default:\r\n className += ' Input__Select__Center';\r\n break;\r\n }\r\n return className;\r\n }\r\n\r\n private getContainerClasses(): string {\r\n let className: string = 'MainInput Input__DropDownMenu ';\r\n className += this.props.className ? this.props.className + ' ' : '';\r\n className += this.props.theme ? this.props.theme + ' ' : '';\r\n return className;\r\n }\r\n\r\n private getLabel(): React.ReactNode {\r\n if (this.props.label) {\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n private getLabelClasses(): string {\r\n let className: string = 'InputLabel';\r\n switch (this.props.alignLabel) {\r\n case 'center':\r\n className += ' InputLabel__Center';\r\n break;\r\n case 'left':\r\n className += ' InputLabel__Left';\r\n break;\r\n case 'right':\r\n className += ' InputLabel__Right';\r\n break;\r\n default:\r\n className += ' InputLabel__Center';\r\n break;\r\n }\r\n\r\n switch (this.props.labelColor) {\r\n case 'black':\r\n className += ' InputLabel--black';\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { getDateTextForView } from 'websd/utils';\r\n\r\nexport interface DayPickerDataProps {\r\n days: string[];\r\n day: string;\r\n isExpanded: boolean;\r\n centerDay: string;\r\n date: Date;\r\n visible: boolean;\r\n clickFromDayPickerDay: string;\r\n}\r\n\r\nexport interface DayPickerActionProps {\r\n setScrollToDay: (day: string) => void; // Scroll to clicked day\r\n updateDayExpanded?: (dayName: string, expanded: boolean) => void;\r\n toggleDayPickerExpanded: (isExpanded: boolean) => void;\r\n setDayClicked: (day: string) => void;\r\n setClicked: (clickFromDayPicker: boolean) => void;\r\n}\r\n\r\ntype DayPickerProps = Readonly & Readonly;\r\n\r\nexport class DayPicker extends React.Component {\r\n expand(expandedDay: string) {\r\n if (this.props.updateDayExpanded) {\r\n this.props.toggleDayPickerExpanded(true);\r\n this.props.updateDayExpanded(this.props.day, true);\r\n }\r\n }\r\n\r\n collapse(event: React.MouseEvent, day?: string) {\r\n event.stopPropagation();\r\n\r\n this.props.toggleDayPickerExpanded(false);\r\n\r\n if (this.props.updateDayExpanded) {\r\n this.props.updateDayExpanded(this.props.day, false);\r\n }\r\n if (day) {\r\n this.props.setDayClicked(day);\r\n this.props.setClicked(true);\r\n\r\n this.props.setScrollToDay(day);\r\n }\r\n }\r\n\r\n getClassName(day: string) {\r\n if (this.props.isExpanded) {\r\n return '';\r\n }\r\n if (this.props.centerDay !== '') {\r\n if (this.props.centerDay === day) {\r\n return '';\r\n }\r\n return 'DayPicker__Item--inactive';\r\n }\r\n\r\n return day === this.props.day ? '' : 'DayPicker__Item--inactive';\r\n }\r\n\r\n onDayPickerListItemClick(event: React.MouseEvent, dayName: string) {\r\n if (this.props.isExpanded && this.props.centerDay !== dayName) {\r\n this.collapse(event, dayName);\r\n }\r\n }\r\n\r\n onDayPickerClick(event: React.MouseEvent) {\r\n if (this.props.isExpanded) {\r\n this.collapse(event);\r\n } else {\r\n this.expand(this.props.day);\r\n }\r\n }\r\n\r\n getDate(day: string | Date) {\r\n return getDateTextForView(day);\r\n }\r\n\r\n render() {\r\n return (\r\n this.onDayPickerClick(event)}\r\n >\r\n
\r\n
\r\n
\r\n
\r\n {this.props.isExpanded && (\r\n
    \r\n {this.props.days.map(day => (\r\n
  • this.onDayPickerListItemClick(e, day)}>\r\n {day}\r\n
  • \r\n ))}\r\n
\r\n )}\r\n {!this.props.isExpanded &&
{this.getDate(this.props.date)}
}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainInput } from 'components/common';\r\nimport { MainInputProps } from './MainInput';\r\nimport { isValidEmail } from 'utils';\r\n\r\ninterface EmailInputActionProps {\r\n onValidChanged?: (isValid: boolean) => void;\r\n}\r\n\r\ninterface EmailInputState {\r\n isValid?: boolean;\r\n shouldValidate?: boolean;\r\n}\r\n\r\ntype EmailInputProps = EmailInputActionProps & MainInputProps;\r\n\r\nexport class EmailInput extends React.Component {\r\n constructor(props: EmailInputProps) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n componentDidMount(): void {\r\n const shouldValidate = this.props.shouldValidate;\r\n this.setState({\r\n shouldValidate: this.props.shouldValidate,\r\n });\r\n if (shouldValidate) {\r\n this.validate(this.props.value as string);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: EmailInputProps): void {\r\n if (newProps.shouldValidate !== this.state.shouldValidate) {\r\n this.setState({\r\n shouldValidate: this.props.shouldValidate,\r\n });\r\n }\r\n if (this.props.value !== newProps.value && newProps.shouldValidate) {\r\n this.validate(newProps.value as string);\r\n }\r\n }\r\n\r\n render(): React.ReactNode {\r\n return this.onValueChange(newValue as string)} />;\r\n }\r\n\r\n private onValueChange(newValue: string): void {\r\n if (this.state.shouldValidate) {\r\n this.validate(newValue);\r\n }\r\n if (this.props.onValueChange) {\r\n this.props.onValueChange(newValue);\r\n }\r\n }\r\n\r\n private validate(value: string): void {\r\n const isValid: boolean = isValidEmail(value);\r\n if (this.props.onValidChanged && this.props.isValid !== isValid) {\r\n this.props.onValidChanged(isValid);\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { CSSTransition } from 'react-transition-group';\r\n\r\ninterface MainInputDataProps {\r\n id?: string;\r\n align?: 'left' | 'center' | 'right';\r\n alignLabel?: 'left' | 'center' | 'right';\r\n alt?: string;\r\n autocomplete?: string;\r\n autoCorrect?: 'off' | 'on';\r\n className?: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n formId?: string;\r\n isValid?: boolean;\r\n label?: string;\r\n labelColor?: string;\r\n max?: number;\r\n maxlength?: number;\r\n min?: number;\r\n name?: string;\r\n placeholder?: string;\r\n readonly?: boolean;\r\n required?: boolean;\r\n step?: string | number;\r\n shouldValidate?: boolean;\r\n type?: string;\r\n value?: string | number;\r\n smallRadius?: boolean;\r\n border?: 'grey';\r\n infoText?: string;\r\n infoType?: 'info' | 'warning' | 'error';\r\n tabindex?: number;\r\n hideSpinner?: boolean;\r\n autoSelect?: boolean;\r\n}\r\n\r\ninterface MainInputActionProps {\r\n onValueChange?: (newValue: string | boolean) => void;\r\n}\r\n\r\nexport type MainInputProps = MainInputDataProps & MainInputActionProps;\r\n\r\nexport const MainInput: React.FunctionComponent = ({\r\n id,\r\n align,\r\n alignLabel,\r\n alt,\r\n autocomplete,\r\n autoCorrect,\r\n className,\r\n checked,\r\n disabled,\r\n formId,\r\n isValid,\r\n label,\r\n labelColor,\r\n max,\r\n maxlength,\r\n min,\r\n name,\r\n placeholder,\r\n readonly,\r\n required,\r\n step,\r\n shouldValidate,\r\n type,\r\n value,\r\n smallRadius,\r\n border,\r\n infoText,\r\n infoType,\r\n tabindex,\r\n hideSpinner,\r\n autoSelect,\r\n\r\n onValueChange,\r\n}) => {\r\n const [skaVisaInfoText, setSkaVisaInfoText] = React.useState(false);\r\n\r\n const hasInfoText = (): boolean => {\r\n return !!infoText && infoText !== '';\r\n };\r\n\r\n const getInfoTextClasses = () => {\r\n let classes = 'MainInput__Label ';\r\n switch (infoType) {\r\n case 'error':\r\n classes += ' MainInput__Label--error';\r\n break;\r\n case 'info':\r\n classes += ' MainInput__Label--info';\r\n break;\r\n case 'warning':\r\n classes += ' MainInput__Label--warning';\r\n break;\r\n default:\r\n classes += ' MainInput__Label--info';\r\n }\r\n return classes;\r\n };\r\n\r\n const getInputClasses = (): string => {\r\n let cName: string = 'Input';\r\n switch (align) {\r\n case 'center':\r\n cName += ' Input__Center';\r\n break;\r\n case 'left':\r\n cName += ' Input__Left';\r\n break;\r\n case 'right':\r\n cName += ' Input__Right';\r\n break;\r\n default:\r\n cName += ' Input__Center';\r\n break;\r\n }\r\n if (smallRadius) {\r\n cName = cName + ' Input__SmallRadius';\r\n }\r\n if (hideSpinner) {\r\n cName += ' Input__NoSpinner';\r\n }\r\n if (border) {\r\n switch (border) {\r\n case 'grey':\r\n return (cName = cName + ' Input__Border--Grey');\r\n default:\r\n return (cName = cName + ' Input__Border--Grey');\r\n }\r\n }\r\n return cName;\r\n };\r\n\r\n const getContainerClasses = (): string => {\r\n let cName: string = 'MainInput ';\r\n cName += className ? className : '';\r\n if (shouldValidate) {\r\n cName += ' ' + (isValid ? 'MainInput__Valid' : 'MainInput__InValid');\r\n }\r\n\r\n return cName;\r\n };\r\n\r\n const getLabel = (): React.ReactNode => {\r\n if (label) {\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n const getLabelClasses = (): string => {\r\n let cName: string = 'InputLabel';\r\n switch (alignLabel) {\r\n case 'center':\r\n cName += ' InputLabel__Center';\r\n break;\r\n case 'left':\r\n cName += ' InputLabel__Left';\r\n break;\r\n case 'right':\r\n cName += ' InputLabel__Right';\r\n break;\r\n default:\r\n cName += ' InputLabel__Center';\r\n break;\r\n }\r\n\r\n switch (labelColor) {\r\n case 'black':\r\n cName += ' InputLabel--black';\r\n break;\r\n default:\r\n break;\r\n }\r\n return cName;\r\n };\r\n\r\n const updateValue = (event: React.ChangeEvent) => {\r\n const target = event.target;\r\n if (onValueChange) {\r\n switch (target.type) {\r\n case 'checkbox':\r\n onValueChange(target.checked);\r\n break;\r\n default:\r\n onValueChange(target.value);\r\n break;\r\n }\r\n }\r\n };\r\n return (\r\n
\r\n {getLabel()}\r\n
\r\n {\r\n if (ref && autoSelect) {\r\n ref.focus();\r\n }\r\n }}\r\n className={getInputClasses()}\r\n alt={alt}\r\n autoComplete={autocomplete}\r\n autoCorrect={autoCorrect}\r\n disabled={disabled}\r\n form={formId}\r\n max={max}\r\n maxLength={maxlength}\r\n min={min}\r\n name={name}\r\n placeholder={placeholder}\r\n readOnly={readonly}\r\n required={required}\r\n step={step}\r\n type={type}\r\n value={type !== 'checkbox' ? value : checked ? 'on' : 'off'}\r\n onChange={event => {\r\n updateValue(event);\r\n setSkaVisaInfoText(false);\r\n }}\r\n checked={checked === true}\r\n tabIndex={tabindex}\r\n onFocus={e => {\r\n if (autoSelect) {\r\n e.currentTarget.select();\r\n }\r\n }}\r\n onBlur={e => {\r\n setSkaVisaInfoText(true);\r\n }}\r\n />\r\n
\r\n \r\n
{infoText}
\r\n \r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface CheckboxDataProps {\r\n label?: string;\r\n className?: string;\r\n checked?: boolean;\r\n name?: string;\r\n required?: boolean;\r\n readonly?: boolean;\r\n children?: string | JSX.Element | JSX.Element[];\r\n}\r\n\r\ninterface CheckboxActionProps {\r\n onValueChange?: (newValue: boolean) => void;\r\n}\r\n\r\nexport type CheckboxProps = CheckboxActionProps & CheckboxDataProps;\r\n\r\nexport const Checkbox: React.SFC = (props: CheckboxProps) => {\r\n const handleOnValueChange = (event: React.MouseEvent) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (props.onValueChange) {\r\n props.onValueChange(!props.checked);\r\n }\r\n };\r\n\r\n const getIconClasses = (): string => {\r\n let classes: string = 'Checkbox__Icon';\r\n if (props.checked) {\r\n classes += ' Checkbox__Icon__Checked';\r\n }\r\n return classes;\r\n };\r\n\r\n const getContainerClasses = (): string => {\r\n let classes: string = 'Checkbox__Container';\r\n if (props.className) {\r\n classes += ' ' + props.className;\r\n }\r\n return classes;\r\n };\r\n\r\n return (\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface ConfirmationTextBoxDataProps {\r\n text: string;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface ConfirmationTextBoxActionProps {\r\n handleNo: () => void;\r\n handleYes: () => void;\r\n}\r\n\r\ntype ConfirmationTextBoxProps = ConfirmationTextBoxDataProps & ConfirmationTextBoxActionProps;\r\n\r\nexport const ConfirmationTextBox = (props: ConfirmationTextBoxProps) => {\r\n const handleNo = (event: React.MouseEvent) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n props.handleNo();\r\n };\r\n\r\n const handleYes = (event: React.MouseEvent) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n props.handleYes();\r\n };\r\n\r\n return (\r\n
\r\n
{props.text}
\r\n\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nexport interface SmallHeaderProps {\r\n headerText: string;\r\n}\r\n\r\nexport class SmallHeader extends React.Component {\r\n render() {\r\n return

{this.props.headerText}

;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Spinner } from './Spinner';\r\n\r\ninterface IconButtonProps {\r\n text: string;\r\n styleType: string;\r\n cssClass?: string;\r\n visible?: boolean;\r\n isExecuting?: boolean;\r\n handleOnClick: (event: React.MouseEvent, statusBarIsActive?: boolean) => void;\r\n}\r\n\r\nexport class IconButton extends React.Component {\r\n render() {\r\n return (\r\n \r\n {this.props.isExecuting && (\r\n ) => {\r\n event.preventDefault();\r\n }}\r\n >\r\n \r\n \r\n )}\r\n {!this.props.isExecuting && (\r\n ) => {\r\n this.props.handleOnClick(event, this.props.visible);\r\n }}\r\n className={'IconButton__Button IconButton__Button' + this.props.styleType}\r\n />\r\n )}\r\n\r\n
\r\n \r\n {this.props.text}\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport icon from '../../static/assets/friskis-logo--white.svg';\r\n\r\nexport interface LogotypProps {\r\n className?: string;\r\n}\r\n\r\nexport const Logotyp: React.SFC = (props: LogotypProps) => (\r\n
\r\n {'Logotyp'}\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\ninterface BowProps {\r\n className?: string;\r\n strokeColor?: string;\r\n style?: React.CSSProperties;\r\n}\r\n\r\nexport const Bow: React.SFC = props => {\r\n const strokeColor = props.strokeColor || '#262626';\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { StatusBar, ConfirmationTextBox, IconButton } from 'components/common';\r\nimport { SitecoreDictionary, SitecorePlaceholder } from 'models';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { NavLink } from 'redux-first-router-link';\r\nimport { passDetailsRouteAction } from 'store/location';\r\nimport { getDateTextForView } from 'websd/utils';\r\nimport { CommandStatus } from 'store/global/fetch';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface BookingItemInternalDataProps {\r\n bokning: fos.api.Bokning;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface BookingItemDataProps {\r\n readonly instruktoerer: string[];\r\n readonly avbokaStatus: CommandStatus;\r\n readonly isCancelled: boolean;\r\n}\r\n\r\nexport interface BookingItemActionProps {\r\n avbokaPass: (\r\n payload: fos.api.CancelPayload,\r\n dayViewObjectKey: string\r\n ) => Promise>;\r\n setSelectedPass: (passId: string, passDay: string) => void;\r\n}\r\n\r\nexport interface BokningItemState {\r\n showConfirmation?: boolean;\r\n showStatusMessage?: boolean;\r\n}\r\n\r\nconst renderWithMaxLength = (input: string, maxLength: number) => {\r\n if (!input) {\r\n return '';\r\n } else {\r\n return input.length > maxLength\r\n ? input.substr(0, maxLength - 3) + '...'\r\n : input;\r\n }\r\n};\r\n\r\ntype BookingItemProps = BookingItemDataProps &\r\n BookingItemActionProps &\r\n BookingItemInternalDataProps;\r\n\r\nexport class BookingItem extends React.Component<\r\n BookingItemProps,\r\n BokningItemState\r\n> {\r\n constructor(props: BookingItemProps) {\r\n super(props);\r\n\r\n this.state = {\r\n showConfirmation: false,\r\n showStatusMessage: false\r\n };\r\n }\r\n\r\n avbokaPass = () => {\r\n const date = getDateTextForView(this.props.bokning.StartTime);\r\n this.props.avbokaPass(\r\n {\r\n bokningId: this.props.bokning.BokningId,\r\n foereningsId: this.props.bokning.FoereningId,\r\n queued: this.props.bokning.Koad,\r\n passId: this.props.bokning.PassId,\r\n anlaeggningsId: this.props.bokning.AnlaeggningsId,\r\n },\r\n date\r\n );\r\n\r\n this.setState({\r\n showStatusMessage: true,\r\n showConfirmation: false,\r\n });\r\n };\r\n\r\n showConfirmation = (event: React.MouseEvent) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n if (this.props.avbokaStatus !== CommandStatus.EXECUTING) {\r\n this.setState({\r\n showConfirmation: !this.state.showConfirmation,\r\n });\r\n }\r\n };\r\n\r\n hideConfirmation = () => {\r\n this.setState({\r\n showConfirmation: false\r\n });\r\n };\r\n\r\n getStatusMessage = () => {\r\n if (this.props.bokning.statusMessage) {\r\n return this.props.bokning.statusMessage;\r\n }\r\n return SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR;\r\n };\r\n\r\n getStatusMessageClass = () => {\r\n if (\r\n this.props.bokning.statusMessage ===\r\n SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return 'StatusMessage--Green';\r\n } else {\r\n return 'StatusMessage--Black';\r\n }\r\n };\r\n\r\n getIconButtonStyle = (): string => {\r\n if (this.props.isCancelled) {\r\n return '--Cancelled';\r\n }\r\n if (this.props.bokning.Koad) {\r\n return '--Queued';\r\n } else if (\r\n this.props.bokning.statusMessage ===\r\n SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return '--Available';\r\n }\r\n return '--Booked';\r\n };\r\n\r\n getIconButtonText = () => {\r\n let res: string = '';\r\n let position: string = this.props\r\n .translate(SitecoreDictionary.Schedule.QueuePosition)\r\n .toString();\r\n if (this.props.isCancelled) {\r\n return this.props\r\n .translate(SitecoreDictionary.Schedule.Messages.CANCELLED)\r\n .toString();\r\n }\r\n if (this.props.bokning.Koad) {\r\n res = position + ' ' + this.props.bokning.KoPlats;\r\n }\r\n return res;\r\n };\r\n\r\n getVisibleStatus = () => {\r\n if (this.state.showStatusMessage && !!this.props.bokning.statusMessage) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n goToPass = () => {\r\n this.props.setSelectedPass(\r\n this.props.bokning.PassId,\r\n this.props.bokning.Day\r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n {this.state.showConfirmation && (\r\n \r\n )}\r\n\r\n
\r\n
\r\n {this.props.bokning.PassStart}\r\n
\r\n
\r\n {this.props.bokning.PassLaengd} min\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n {this.props.bokning.Name}\r\n
\r\n
\r\n
\r\n\r\n
{renderWithMaxLength(this.props.instruktoerer[0], 80)}
\r\n\r\n
\r\n
\r\n
\r\n {this.props.bokning.AnlaeggningsNamn}\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { BookingItemDataProps, BookingItemInternalDataProps, BookingItem, BookingItemActionProps } from '.';\r\nimport { FetchCommandTypes, getCommandStatus } from 'store/global/fetch';\r\nimport { avbokaPass } from 'store/bokningar';\r\nimport { PassUtils } from 'utils';\r\nimport { setSelectedPassById } from 'store/global/ui/schedule/uiScheduleThunks';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\n\r\nconst mapState = (state: RootState, props: BookingItemInternalDataProps): BookingItemDataProps => {\r\n const day = state.pass.read.days.find(d => d.key === props.bokning.Day);\r\n const pass = !!day ? day.items.find(p => p.PassId === props.bokning.PassId) : undefined;\r\n return {\r\n avbokaStatus: getCommandStatus(state.global.fetch, props.bokning.PassId, FetchCommandTypes.AVBOKA_PASS),\r\n isCancelled: PassUtils.isBookedPassCancelled(props.bokning, state.pass.read.days),\r\n instruktoerer: !!pass ? pass.Instruktoerer : [''],\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): BookingItemActionProps => ({\r\n avbokaPass: (payload, dayViewObjectKey) =>\r\n dispatch>>(avbokaPass(payload, dayViewObjectKey)),\r\n setSelectedPass: (passId, passDay) => dispatch(setSelectedPassById(passId, passDay)),\r\n});\r\n\r\nexport default connect(mapState, mapDispatchToProps)(BookingItem);\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport FriskisLogo from 'static/assets/friskis-logo--red.svg';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { routesMap, LocationActionTypes } from 'store/location';\r\nimport { IconBigClose } from 'components/icons';\r\nimport { Provider } from 'react-redux';\r\nimport { store } from 'index';\r\nimport { lockBackgroundScroll, unlockBackgroundCallback } from 'websd/utils';\r\n\r\ninterface OverlayProps {\r\n className?: string;\r\n title?: string;\r\n hideHeader?: boolean;\r\n close?: () => void;\r\n}\r\n\r\nexport const Overlay: React.FunctionComponent = ({ className, title, hideHeader, children, close }) => {\r\n const [unlockBackgroundScrollCallback, setUnlockBackgroundScrollCallback] = React.useState<\r\n unlockBackgroundCallback | undefined\r\n >(undefined);\r\n\r\n const render = React.useCallback(\r\n (p: HTMLDivElement) => {\r\n ReactDOM.render(\r\n \r\n {children && (\r\n
\r\n
e.stopPropagation()}>\r\n {!hideHeader && (\r\n
\r\n
\r\n \r\n \"Friskis\"\r\n \r\n
\r\n {title &&
{title}
}\r\n {!!close && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
{children}
\r\n
\r\n
\r\n )}\r\n
,\r\n p\r\n );\r\n },\r\n [title, close, children, hideHeader]\r\n );\r\n\r\n React.useEffect(() => {\r\n const wrapper = document.getElementById('wrapper');\r\n const p = document.createElement('div');\r\n p.className = 'Overlay ' + (className ? className : '');\r\n if (wrapper) {\r\n wrapper.appendChild(p);\r\n }\r\n p.id = '_overlay';\r\n setUnlockBackgroundScrollCallback(lockBackgroundScroll());\r\n\r\n return () => {\r\n if (unlockBackgroundScrollCallback) {\r\n unlockBackgroundScrollCallback();\r\n }\r\n if (p) {\r\n const wrapper = document.getElementById('wrapper');\r\n if (wrapper) {\r\n wrapper.removeChild(p);\r\n }\r\n }\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n let p = document.getElementById('_overlay');\r\n if (p) {\r\n render(p as HTMLDivElement);\r\n }\r\n }, [render]);\r\n\r\n return null;\r\n};\r\n","import * as React from 'react';\r\nimport { MainButton } from 'components/common';\r\n\r\ninterface ShoppingBasketButtonProps {\r\n amount: number;\r\n className: string;\r\n}\r\n\r\ninterface ShoppingBasketButtonState {\r\n shoppingBasketButtonHasSomeFocus: boolean;\r\n}\r\n\r\nexport class ShoppingBasketButton extends React.Component {\r\n constructor(props: ShoppingBasketButtonProps) {\r\n super(props);\r\n\r\n this.state = {\r\n shoppingBasketButtonHasSomeFocus: false,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: ShoppingBasketButtonProps) {\r\n if (prevProps.amount !== this.props.amount) {\r\n this.giveShoppingBasketButtonSomeFocus();\r\n }\r\n }\r\n\r\n giveShoppingBasketButtonSomeFocus = () => {\r\n this.setState(\r\n {\r\n ...this.state,\r\n shoppingBasketButtonHasSomeFocus: true,\r\n },\r\n () => {\r\n setTimeout(() => {\r\n this.setState({\r\n ...this.state,\r\n shoppingBasketButtonHasSomeFocus: false,\r\n });\r\n }, 100);\r\n }\r\n );\r\n };\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n \r\n {this.props.amount}\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainInput } from '.';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nimport { LocationState } from 'store/location';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface NewPasswordDataProps {\r\n className?: string;\r\n translate: TranslateFunction;\r\n passwordValue: string;\r\n repeatPasswordValue: string;\r\n isPasswordValid: boolean;\r\n isRepeatPasswordValid: boolean;\r\n alignText?: 'left' | 'center';\r\n disabled?: boolean;\r\n location: LocationState;\r\n}\r\n\r\ninterface NewPasswordActionProps {\r\n updatePassword: (value: string) => void;\r\n updateRepeatPassword: (value: string) => void;\r\n updatePasswordValidity: (isValid: boolean) => void;\r\n updateRepeatPasswordValidity: (isValid: boolean) => void;\r\n}\r\n\r\ninterface NewPasswordState {\r\n isAnlaeggningarOverlayOpen: boolean;\r\n}\r\n\r\nexport type NewPasswordProps = NewPasswordDataProps & NewPasswordActionProps;\r\n\r\nexport class NewPassword extends React.Component {\r\n render() {\r\n return (\r\n
\r\n this.onPasswordChange(val as string)}\r\n isValid={this.props.isPasswordValid}\r\n disabled={this.props.disabled}\r\n infoText={\r\n !this.props.isPasswordValid && !!this.props.passwordValue && this.props.passwordValue !== ''\r\n ? (this.props.translate(SitecoreDictionary.Common.NewPasswordField.NewPasswordRules) as string)\r\n : undefined\r\n }\r\n infoType=\"error\"\r\n autocomplete=\"off\"\r\n />\r\n\r\n this.onRepeatPasswordChange(val as string)}\r\n isValid={this.props.isRepeatPasswordValid}\r\n disabled={this.props.disabled}\r\n autocomplete=\"off\"\r\n />\r\n
\r\n );\r\n }\r\n\r\n private onPasswordChange(value: string) {\r\n this.props.updatePassword(value as string);\r\n this.validateInput(value, this.props.repeatPasswordValue);\r\n }\r\n\r\n private onRepeatPasswordChange(value: string) {\r\n this.props.updateRepeatPassword(value as string);\r\n this.validateInput(this.props.passwordValue, value);\r\n }\r\n\r\n private validateInput(password?: string, repeatPassword?: string) {\r\n const isPasswordValid = this.isPasswordValid(password);\r\n this.props.updatePasswordValidity(isPasswordValid);\r\n const isRepeatPasswordValid = this.isRepeatedPasswordValid(repeatPassword, password);\r\n this.props.updateRepeatPasswordValidity(isRepeatPasswordValid);\r\n }\r\n\r\n private isPasswordValid(value?: string) {\r\n return !!value && value.length > 5 && /\\d/.test(value);\r\n }\r\n\r\n private isRepeatedPasswordValid(value?: string, password?: string) {\r\n return !!value && !!password && this.isPasswordValid(password) && value === password;\r\n }\r\n\r\n private getContainerClassName() {\r\n return 'NewPasswordContainer ' + (this.props.className ? this.props.className : '');\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\n// import { SitecoreDictionary } from 'models';\r\n\r\nexport interface PopOverProps {\r\n constraintElement: HTMLElement;\r\n skipArrow?: boolean;\r\n horizontalPadding?: number;\r\n verticalPadding?: number;\r\n children?: string | JSX.Element | Array;\r\n popoverClassName?: string;\r\n popoverContainerClassName?: string;\r\n}\r\n\r\ninterface PopOverState {}\r\n\r\nexport class PopOver extends React.Component {\r\n constructor(props: PopOverProps) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n getContainerStyle = (containerRef: HTMLDivElement): { marginLeft: string; marginRight: string; height: string } => {\r\n const style: { marginLeft: string; marginRight: string; height: string } = {\r\n marginLeft: '',\r\n marginRight: '',\r\n height: '',\r\n };\r\n containerRef.style.marginRight = '0px';\r\n containerRef.style.marginLeft = '0px';\r\n const containerRect = containerRef.getBoundingClientRect();\r\n const constraintRect = this.props.constraintElement.getBoundingClientRect();\r\n if (containerRect.left <= constraintRect.left) {\r\n const m = (constraintRect.left - containerRect.left) * 2;\r\n if (this.props.horizontalPadding) {\r\n style.marginLeft = m + this.props.horizontalPadding * 2 + 'px';\r\n } else {\r\n style.marginLeft = m + 'px';\r\n }\r\n } else {\r\n style.marginLeft = '0px';\r\n }\r\n if (containerRect.right >= constraintRect.right) {\r\n const m = (containerRect.right - constraintRect.right) * 2;\r\n if (this.props.horizontalPadding) {\r\n style.marginRight = m + this.props.horizontalPadding * 2 + 'px';\r\n } else {\r\n style.marginRight = m + 'px';\r\n }\r\n } else {\r\n style.marginRight = '0px';\r\n }\r\n if (containerRect.bottom + (this.props.verticalPadding || 0) >= window.innerHeight) {\r\n style.height =\r\n containerRect.height - (containerRect.bottom - window.innerHeight) - (this.props.verticalPadding || 0) + 'px';\r\n } else {\r\n style.height = 'unset';\r\n }\r\n return style;\r\n };\r\n\r\n render() {\r\n // const translate = this.props.translate;\r\n return (\r\n \r\n {\r\n if (r) {\r\n const style = this.getContainerStyle(r);\r\n r.style.marginRight = style.marginRight || '0px';\r\n r.style.marginLeft = style.marginLeft;\r\n r.style.height = style.height;\r\n }\r\n }}\r\n className={`PopOver__Container${\r\n this.props.popoverContainerClassName ? ' ' + this.props.popoverContainerClassName : ''\r\n }`}\r\n >\r\n {this.props.children}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainInput } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AutogiroInputDataProps {\r\n className?: string;\r\n isClearingNumberValid?: boolean;\r\n isAccountNumberValid?: boolean;\r\n required?: boolean;\r\n shouldValidate?: boolean;\r\n clearingNumberValue: string;\r\n accountNumberValue: string;\r\n disabled?: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface AutogiroInputActionProps {\r\n onClearingNumberChange: (newValue: string) => void;\r\n onAccountNumberChange: (newValue: string) => void;\r\n}\r\n\r\nexport type AutogiroInputProps = AutogiroInputDataProps & AutogiroInputActionProps;\r\n\r\nexport const AutogiroInput: React.SFC = props => (\r\n
\r\n

\r\n {props.translate(SitecoreDictionary.Profile.PaymentSettings.DebitDetails)}\r\n

\r\n
\r\n props.onClearingNumberChange(value as string)}\r\n disabled={props.disabled}\r\n type=\"number\"\r\n autocomplete=\"off\"\r\n hideSpinner={true}\r\n />\r\n props.onAccountNumberChange(value as string)}\r\n disabled={props.disabled}\r\n autocomplete=\"off\"\r\n type=\"number\"\r\n hideSpinner={true}\r\n />\r\n
\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Overlay } from 'components/common';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PopupGDPRPassedProps {\r\n buttons?: { text: string; buttonType: 'primary' | 'secondary'; onClick: () => void }[];\r\n onClose?: () => void;\r\n readonly translate: TranslateFunction;\r\n}\r\n\r\nexport type PopupGDPRProps = PopupGDPRPassedProps;\r\n\r\nexport class PopupGDPR extends React.Component {\r\n render() {\r\n return (\r\n \r\n
\r\n \r\n
\r\n {this.props.translate(SitecoreDictionary.GDPR.GDPR)}\r\n
\r\n
\r\n {!!this.props.buttons &&\r\n this.props.buttons.map((button, index) => {\r\n return (\r\n \r\n {index > 0 &&
}\r\n
\r\n \r\n {this.props.translate(button.text)}\r\n \r\n
\r\n \r\n );\r\n })}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { TextBox } from 'components/common/TextBox';\r\nimport { PopupGDPR } from 'components/shoppingBasket/forms/PopupGDPR';\r\nimport { UISettingsProfileUnderEdit } from 'store/global/ui/settings/profile';\r\nimport { ProfilePropertyNameValues } from 'store/global/ui/settings/profile/uiSettingsProfileModels';\r\nimport { TextBoxMessagingStatus } from 'components/common/TextBox';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { isValidEmail } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ProfileDataProps {\r\n editableUser?: fos.api.User;\r\n uiSettingsProfileState: UISettingsProfileUnderEdit;\r\n readonly unchangedUser: fos.api.User;\r\n inloggadFoereningId: number | undefined;\r\n translate: TranslateFunction;\r\n cmdErrorCode?: number;\r\n isDesktopMode: boolean;\r\n getIsExecutingForPropertyName: (propertName: string) => boolean;\r\n getIsExecutedForPropertyName: (propertName: string) => boolean;\r\n getIsExecutingFailedForPropertyName: (propertName: string) => boolean;\r\n}\r\n\r\nexport interface ProfileActionProps {\r\n onUserPropertyChange: (editedUser: fos.api.User) => void;\r\n onEditField: (uiField: UISettingsProfileUnderEdit) => void;\r\n onRevertField: (uiField: UISettingsProfileUnderEdit, unchangedUser: fos.api.User) => void;\r\n onAcceptField: (uiField: UISettingsProfileUnderEdit, editedUser: fos.api.User) => void;\r\n onTextBoxClick: (uiField: ProfilePropertyNameValues) => void;\r\n getProfileInfo: (foereningId: number) => void;\r\n updateUserProfileCmd: (foereningId: number, user: fos.api.User, propertyName: string) => void;\r\n initializeUserProfileCmd: (foereningId: number, propertyName: string) => void;\r\n}\r\ninterface ProfileState {\r\n isGdprVillkorOpened?: boolean;\r\n}\r\n\r\nconst initialState: ProfileState = {\r\n isGdprVillkorOpened: false,\r\n};\r\n\r\ntype ProfileProps = ProfileDataProps & ProfileActionProps;\r\nexport class Profile extends React.Component {\r\n constructor(props: ProfileProps) {\r\n super(props);\r\n this.state = initialState;\r\n this.toggleGdprVillkor = this.toggleGdprVillkor.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n if (!!this.props.inloggadFoereningId) {\r\n this.props.getProfileInfo(this.props.inloggadFoereningId);\r\n }\r\n }\r\n\r\n fieldChanged(evt: React.ChangeEvent) {\r\n const propertyName = evt.target.name as ProfilePropertyNameValues;\r\n const user = { ...this.props.editableUser };\r\n if (user[propertyName] === undefined) {\r\n console.warn(`${evt.target.name} does not exis on user!`);\r\n }\r\n user[propertyName] = evt.target.value;\r\n if (\r\n this.props.getIsExecutedForPropertyName(propertyName) ||\r\n this.props.getIsExecutingFailedForPropertyName(propertyName)\r\n ) {\r\n this.resetCmdForProperty(propertyName);\r\n }\r\n this.props.onUserPropertyChange(user as fos.api.User);\r\n }\r\n\r\n /*\r\n * We are only allowed to start editing a field if we are not currently editing another field.\r\n */\r\n activateEditMode(propertyName: string) {\r\n const uiField = { ...this.props.uiSettingsProfileState };\r\n for (const key in uiField) {\r\n if ((uiField as any)[key] === true) {\r\n return;\r\n } else {\r\n (uiField as any)[key] = false;\r\n }\r\n }\r\n (uiField as any)[propertyName] = true;\r\n this.props.onEditField(uiField);\r\n }\r\n\r\n onTextBoxClick(propertyName: ProfilePropertyNameValues) {\r\n this.props.onTextBoxClick(propertyName);\r\n }\r\n\r\n onRevertClicked(propertyName: string) {\r\n const uiField = { ...this.props.uiSettingsProfileState };\r\n if (propertyName === ProfilePropertyNameValues.City || propertyName === ProfilePropertyNameValues.ZipCode) {\r\n uiField[ProfilePropertyNameValues.City] = false;\r\n uiField[ProfilePropertyNameValues.ZipCode] = false;\r\n } else {\r\n (uiField as any)[propertyName] = false;\r\n }\r\n this.props.onRevertField(uiField, this.props.unchangedUser);\r\n }\r\n\r\n onAcceptClicked(propertyName: ProfilePropertyNameValues, value: string) {\r\n if (propertyName === ProfilePropertyNameValues.City || propertyName === ProfilePropertyNameValues.ZipCode) {\r\n if (\r\n !this.isInputCorrectlyFormatted(\r\n ProfilePropertyNameValues.City,\r\n (this.props.editableUser as fos.api.User).City\r\n ) ||\r\n !this.isInputCorrectlyFormatted(\r\n ProfilePropertyNameValues.ZipCode,\r\n (this.props.editableUser as fos.api.User).ZipCode\r\n )\r\n ) {\r\n return;\r\n }\r\n } else {\r\n if (!this.isInputCorrectlyFormatted(propertyName, value)) {\r\n return;\r\n }\r\n }\r\n const uiField = { ...this.props.uiSettingsProfileState };\r\n if (propertyName === ProfilePropertyNameValues.City || propertyName === ProfilePropertyNameValues.ZipCode) {\r\n uiField[ProfilePropertyNameValues.City] = false;\r\n uiField[ProfilePropertyNameValues.ZipCode] = false;\r\n } else {\r\n uiField[propertyName] = false;\r\n }\r\n this.props.onAcceptField(uiField, this.props.editableUser as fos.api.User);\r\n if (!!this.props.inloggadFoereningId) {\r\n this.props.updateUserProfileCmd(\r\n this.props.inloggadFoereningId,\r\n this.props.editableUser as fos.api.User,\r\n propertyName\r\n );\r\n }\r\n }\r\n\r\n isInputCorrectlyFormatted(propertyName: ProfilePropertyNameValues, value: string): boolean {\r\n switch (propertyName) {\r\n case ProfilePropertyNameValues.Email:\r\n return isValidEmail(value);\r\n case ProfilePropertyNameValues.ZipCode:\r\n return !(!value || isNaN(Number(value)) || value.length !== 5);\r\n case ProfilePropertyNameValues.PhoneNumber:\r\n var regEx = /^[0-9 ()+-]+$/;\r\n return !!value && regEx.test(value) && value.length > 8;\r\n // return !isNaN(Number(value));\r\n case ProfilePropertyNameValues.FirstName:\r\n case ProfilePropertyNameValues.LastName:\r\n return !!value && value.trim() !== '' && !/\\d+/.test(value);\r\n case ProfilePropertyNameValues.Address:\r\n case ProfilePropertyNameValues.City:\r\n return !!value && value.trim() !== '';\r\n default:\r\n console.warn(`Property ${propertyName} has no validation rules!`);\r\n return true;\r\n }\r\n }\r\n renderAlerts(\r\n propertyName: ProfilePropertyNameValues,\r\n uiSettingsProfileState: UISettingsProfileUnderEdit,\r\n value: string\r\n ): TextBoxMessagingStatus | undefined {\r\n // TODO: Handle error statuses for textbox\r\n if (\r\n uiSettingsProfileState[propertyName] &&\r\n uiSettingsProfileState.PropertyFieldUnderClick !== propertyName &&\r\n !(\r\n (uiSettingsProfileState.PropertyFieldUnderClick === ProfilePropertyNameValues.ZipCode &&\r\n propertyName === ProfilePropertyNameValues.City) ||\r\n (uiSettingsProfileState.PropertyFieldUnderClick === ProfilePropertyNameValues.City &&\r\n propertyName === ProfilePropertyNameValues.ZipCode)\r\n )\r\n ) {\r\n // Får ej byta till ett annat fält innan att trycka på spara eller avbryt\r\n // Förutom Postnummer/Ort, då går det bra\r\n if (propertyName === ProfilePropertyNameValues.ZipCode && uiSettingsProfileState[propertyName] === true) {\r\n // Visa felet på Ort fältet istället\r\n return;\r\n }\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.MustSaveBeforeContinue) as string,\r\n },\r\n };\r\n } else {\r\n if (\r\n propertyName === ProfilePropertyNameValues.City &&\r\n uiSettingsProfileState[ProfilePropertyNameValues.ZipCode] &&\r\n uiSettingsProfileState.PropertyFieldUnderClick !== ProfilePropertyNameValues.ZipCode &&\r\n uiSettingsProfileState.PropertyFieldUnderClick !== ProfilePropertyNameValues.City\r\n ) {\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.MustSaveBeforeContinue) as string,\r\n },\r\n };\r\n }\r\n if (!value || value.trim() === '') {\r\n // Alla fält är obligatoriska\r\n /*return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.RequiredFieldError) as string\r\n }\r\n };*/\r\n } else {\r\n if (!this.isInputCorrectlyFormatted(propertyName, value)) {\r\n switch (propertyName) {\r\n case ProfilePropertyNameValues.FirstName:\r\n case ProfilePropertyNameValues.LastName:\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.FieldAcceptOnlyChars) as string,\r\n },\r\n };\r\n case ProfilePropertyNameValues.Email:\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.InvalidEmail) as string,\r\n },\r\n };\r\n case ProfilePropertyNameValues.ZipCode:\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.InvalidZipCode) as string,\r\n },\r\n };\r\n case ProfilePropertyNameValues.PhoneNumber:\r\n return {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Profile.InvalidTelNumber) as string,\r\n },\r\n };\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n if (this.props.getIsExecutedForPropertyName(propertyName)) {\r\n this.resetCmdForProperty(propertyName, 3000);\r\n return {\r\n warning: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Common.SavingSucceed) as string,\r\n },\r\n };\r\n }\r\n if (this.props.getIsExecutingFailedForPropertyName(propertyName)) {\r\n this.resetCmdForProperty(propertyName, 6000);\r\n const msg = {\r\n error: {\r\n show: true,\r\n message: this.props.translate(SitecoreDictionary.Common.SavingFailed) as string,\r\n },\r\n };\r\n switch (propertyName) {\r\n case ProfilePropertyNameValues.Email:\r\n if (this.props.cmdErrorCode === 409) {\r\n msg.error.message = this.props.translate(SitecoreDictionary.Profile.EmailAlreadyExists) as string;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n return msg;\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n renderTextBox(title: string, value: string, propertyName: ProfilePropertyNameValues, enabled: boolean) {\r\n return (\r\n this.fieldChanged(event)}\r\n activateEditMode={property => this.activateEditMode(property)}\r\n onTextBoxClick={(property: ProfilePropertyNameValues) => this.onTextBoxClick(property)}\r\n onRevertClicked={property => this.onRevertClicked(property)}\r\n onAcceptClicked={(property, newValue) => this.onAcceptClicked(property as ProfilePropertyNameValues, newValue)}\r\n title={title}\r\n propertyName={propertyName}\r\n value={value || ''}\r\n enabled={enabled}\r\n alerts={this.renderAlerts(propertyName, this.props.uiSettingsProfileState, value)}\r\n isValid={this.isInputCorrectlyFormatted(propertyName, value)}\r\n isWorking={this.props.getIsExecutingForPropertyName(propertyName)}\r\n alwaysHideActions={propertyName === ProfilePropertyNameValues.ZipCode}\r\n />\r\n );\r\n }\r\n\r\n render() {\r\n const { uiSettingsProfileState, editableUser } = this.props;\r\n\r\n return (\r\n
\r\n {editableUser &&\r\n this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.Firstname) as string,\r\n editableUser.FirstName,\r\n ProfilePropertyNameValues.FirstName,\r\n uiSettingsProfileState.FirstName\r\n )}\r\n {editableUser &&\r\n this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.Lastname) as string,\r\n editableUser.LastName,\r\n ProfilePropertyNameValues.LastName,\r\n uiSettingsProfileState.LastName\r\n )}\r\n {editableUser &&\r\n this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.Email) as string,\r\n editableUser.Email,\r\n ProfilePropertyNameValues.Email,\r\n uiSettingsProfileState.Email\r\n )}\r\n {editableUser &&\r\n this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.Phonenumber) as string,\r\n editableUser.PhoneNumber,\r\n ProfilePropertyNameValues.PhoneNumber,\r\n uiSettingsProfileState.PhoneNumber\r\n )}\r\n {editableUser &&\r\n this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.Address) as string,\r\n editableUser.Address,\r\n ProfilePropertyNameValues.Address,\r\n uiSettingsProfileState.Address\r\n )}\r\n {editableUser && (\r\n
\r\n {this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.ZipCode) as string,\r\n editableUser.ZipCode,\r\n ProfilePropertyNameValues.ZipCode,\r\n uiSettingsProfileState.ZipCode || uiSettingsProfileState.City\r\n )}\r\n {this.renderTextBox(\r\n this.props.translate(SitecoreDictionary.Profile.City) as string,\r\n editableUser.City,\r\n ProfilePropertyNameValues.City,\r\n uiSettingsProfileState.City || uiSettingsProfileState.ZipCode\r\n )}\r\n
\r\n )}\r\n\r\n {\r\n \r\n \r\n
\r\n Friskis hantering av personuppgifter\r\n
\r\n
\r\n {this.state.isGdprVillkorOpened && (\r\n \r\n )}\r\n
\r\n }\r\n
\r\n );\r\n }\r\n\r\n private toggleGdprVillkor() {\r\n this.setState({\r\n isGdprVillkorOpened: !this.state.isGdprVillkorOpened,\r\n });\r\n }\r\n\r\n private resetCmdForProperty(propertyName: ProfilePropertyNameValues, timeout?: number) {\r\n setTimeout(\r\n () => this.props.initializeUserProfileCmd(this.props.inloggadFoereningId as number, propertyName),\r\n timeout\r\n );\r\n }\r\n}\r\n","import { initialCommand } from './../../../store/global/fetch/fetchActions';\r\nimport { connect } from 'react-redux';\r\nimport { RootState, Dispatch, Action } from 'store';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { UpdateUserProfileCmdActionTypes } from 'store/user/updateUserProfileCmd';\r\nimport { ProfilePropertyNameValues } from 'store/global/ui/settings/profile/uiSettingsProfileModels';\r\nimport { Profile, ProfileDataProps, ProfileActionProps } from './Profile';\r\nimport { UISettingsProfileUnderEdit, uiSettingsProfileActionType } from 'store/global/ui/settings/profile';\r\nimport {\r\n UpdateUISettingsProfileClickAction,\r\n UpdateUISettingsProfileAction,\r\n} from 'store/global/ui/settings/profile/uiSettingsProfileActions';\r\nimport { getProfileInfo } from 'store/user/thunks';\r\nimport { updateUserProfileCmd } from 'store/user/updateUserProfileCmd';\r\nimport { getIsExecuting, FetchCommandTypes, getIsExecuted, getIsExecutingFailed } from 'store/global/fetch';\r\n\r\nconst getCmdId = (activeFoerening: number, propertyName: string) => `${activeFoerening}/${propertyName}`;\r\n\r\nconst onAcceptField = (uiField: UISettingsProfileUnderEdit, editedUser: fos.api.User) => (\r\n dispatch: Dispatch\r\n) => {\r\n dispatch({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit,\r\n uiSettingsProfileUnderEdit: uiField,\r\n });\r\n};\r\n\r\nconst onEditField = (uiField: UISettingsProfileUnderEdit) => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit,\r\n uiSettingsProfileUnderEdit: uiField,\r\n });\r\n};\r\n\r\nconst onTextBoxClick = (uiField: ProfilePropertyNameValues) => (\r\n dispatch: Dispatch\r\n) => {\r\n dispatch({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderClick,\r\n propertyFieldUnderClick: uiField,\r\n });\r\n};\r\n\r\nconst onRevertField = (uiField: UISettingsProfileUnderEdit, unchangedUser: fos.api.User) => (\r\n dispatch: Dispatch\r\n) => {\r\n dispatch({\r\n type: uiSettingsProfileActionType.UpdateUISettingsProfileUnderEdit,\r\n uiSettingsProfileUnderEdit: uiField,\r\n });\r\n dispatch({\r\n type: UpdateUserProfileCmdActionTypes.UpdateUser,\r\n user: unchangedUser,\r\n });\r\n};\r\n\r\nconst onUserPropertyChange = (editedUser: fos.api.User) => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: UpdateUserProfileCmdActionTypes.UpdateUser,\r\n user: editedUser,\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): ProfileDataProps => {\r\n return {\r\n editableUser: state.user.write.user,\r\n unchangedUser: state.user.read.user,\r\n uiSettingsProfileState: state.global.ui.uiSettingsProfileState.uiProfileSettings,\r\n inloggadFoereningId: state.global.session.activeFoerening,\r\n translate: getTranslate(state.locale),\r\n cmdErrorCode: state.user.write.errorCode,\r\n isDesktopMode: props.isDesktopMode,\r\n getIsExecutingForPropertyName: propertyName =>\r\n getIsExecuting(\r\n state.global.fetch,\r\n getCmdId(state.global.session.activeFoerening as number, propertyName),\r\n FetchCommandTypes.SPARA_ANVAENDARE\r\n ),\r\n getIsExecutedForPropertyName: propertyName =>\r\n getIsExecuted(\r\n state.global.fetch,\r\n getCmdId(state.global.session.activeFoerening as number, propertyName),\r\n FetchCommandTypes.SPARA_ANVAENDARE\r\n ),\r\n getIsExecutingFailedForPropertyName: propertyName =>\r\n getIsExecutingFailed(\r\n state.global.fetch,\r\n getCmdId(state.global.session.activeFoerening as number, propertyName),\r\n FetchCommandTypes.SPARA_ANVAENDARE\r\n ),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): ProfileActionProps => ({\r\n onUserPropertyChange: editedUser => dispatch(onUserPropertyChange(editedUser)),\r\n onEditField: uiField => dispatch(onEditField(uiField)),\r\n onRevertField: (uiField, unchangedUser) => dispatch(onRevertField(uiField, unchangedUser)),\r\n onAcceptField: (uiField, editedUser) => dispatch(onAcceptField(uiField, editedUser)),\r\n onTextBoxClick: uiField => dispatch(onTextBoxClick(uiField)),\r\n getProfileInfo: foereningId => dispatch(getProfileInfo(foereningId)),\r\n updateUserProfileCmd: (foereningId, user, propertyName) =>\r\n dispatch(updateUserProfileCmd(foereningId, user, propertyName)),\r\n initializeUserProfileCmd: (foereningId, propertyName) =>\r\n dispatch(initialCommand(getCmdId(foereningId, propertyName), FetchCommandTypes.SPARA_ANVAENDARE)),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Profile);\r\n","import * as React from 'react';\r\n\r\ninterface NextBokningTitleDataProps {\r\n title: string;\r\n}\r\n\r\nexport const NextBokningTitle: React.SFC = props => (\r\n
{props.title}
\r\n);\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models/SitecoreDictionary';\r\nimport { NextBokningTitle } from '../nextBokningTitle';\r\nimport { IconCalendar } from '../../../icons';\r\nimport { Bow } from 'components/common';\r\nimport { getAngleBetween } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface NoBookedPassDataProps {\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface NoBookedPassActionProps {\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n goToScheduleMobile: () => void;\r\n}\r\n\r\nexport interface NoBookedPassState {\r\n bowStyles: React.CSSProperties;\r\n bowStylesCalculated: boolean;\r\n}\r\n\r\ntype NoBookedPassProps = Readonly;\r\n\r\nconst initialState: NoBookedPassState = {\r\n bowStyles: {},\r\n bowStylesCalculated: false,\r\n};\r\n\r\nexport class NoBookedPass extends React.Component {\r\n private iconRef?: HTMLDivElement | null;\r\n private textRef?: HTMLDivElement | null;\r\n\r\n constructor(props: NoBookedPassProps) {\r\n super(props);\r\n this.state = initialState;\r\n this.refresh = this.refresh.bind(this);\r\n this.hardRefreshListener = this.hardRefreshListener.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('resize', this.hardRefreshListener);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('resize', this.hardRefreshListener);\r\n }\r\n\r\n onScheduleClick() {\r\n if (this.props.isDesktopMode) {\r\n this.props.openSidebarSchedule();\r\n this.props.showSidebar();\r\n } else {\r\n this.props.goToScheduleMobile();\r\n this.openFilterIcon();\r\n }\r\n }\r\n openFilterIcon = () => {\r\n var isSafari =\r\n navigator.vendor &&\r\n navigator.vendor.indexOf('Apple') > -1 &&\r\n navigator.userAgent &&\r\n navigator.userAgent.indexOf('CriOS') === -1 &&\r\n navigator.userAgent.indexOf('FxiOS') === -1;\r\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\r\n var iOS2 = !!navigator.platform.match(/iPhone|iPod|iPad/);\r\n const filterIco = document.getElementById('FilterIconHeader');\r\n if (iOS || iOS2 || isSafari) {\r\n if (filterIco !== null) {\r\n filterIco.setAttribute('style', 'display: block');\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n
this.onScheduleClick()}>\r\n
\r\n \r\n
\r\n
\r\n
this.setTextRef(ref)}>\r\n {this.props.translate(SitecoreDictionary.StartPage.NoBookedPassText)}\r\n
\r\n \r\n
this.setIconRef(ref)}>\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private setTextRef(elementRef: HTMLDivElement | null) {\r\n this.textRef = elementRef;\r\n this.refresh();\r\n }\r\n\r\n private setIconRef(elementRef: HTMLDivElement | null) {\r\n this.iconRef = elementRef;\r\n this.refresh();\r\n }\r\n\r\n private hardRefreshListener = () => this.refresh(true);\r\n\r\n private refresh(hardRefresh: boolean = false) {\r\n if (this.textRef && this.iconRef && (!this.state.bowStylesCalculated || hardRefresh)) {\r\n this.updateBowStyles();\r\n }\r\n }\r\n\r\n private updateBowStyles() {\r\n if (!this.iconRef || !this.textRef) {\r\n return;\r\n } else {\r\n const cssProps: React.CSSProperties = {\r\n position: 'absolute',\r\n width: '100%',\r\n height: 'auto',\r\n };\r\n const left = this.textRef.offsetLeft + this.textRef.offsetWidth * 0.66 + 'px';\r\n const width =\r\n this.iconRef.offsetLeft +\r\n this.textRef.offsetWidth * 0.33 -\r\n (this.textRef.offsetLeft + this.textRef.offsetWidth) +\r\n 'px';\r\n const Start = {\r\n x: this.textRef.offsetHeight + this.textRef.offsetTop,\r\n y: this.textRef.offsetLeft + this.textRef.offsetWidth / 2,\r\n };\r\n\r\n const End = {\r\n x: this.iconRef.offsetHeight + this.iconRef.offsetTop,\r\n y: this.iconRef.offsetWidth,\r\n };\r\n const angleDeg = getAngleBetween(Start, End, {\r\n x: End.x,\r\n y: Start.y,\r\n });\r\n\r\n let top = this.iconRef.offsetHeight + this.iconRef.offsetTop;\r\n top += top * 0.1; // lil margin\r\n this.setState({\r\n ...this.state,\r\n bowStyles: {\r\n ...cssProps,\r\n left,\r\n top,\r\n width,\r\n transform: `rotateZ(${angleDeg}deg)`,\r\n },\r\n bowStylesCalculated: true,\r\n });\r\n }\r\n }\r\n}\r\n","interface Point {\r\n x: number;\r\n y: number;\r\n}\r\n\r\nexport const getAngleBetween = (a: Point, b: Point, c: Point) => {\r\n // http://jsfiddle.net/m1erickson/XnL3B/\r\n const dx1 = a.x - b.x;\r\n const dy1 = a.y - b.y;\r\n const dx2 = c.x - b.x;\r\n const dy2 = c.y - b.y;\r\n const a1 = Math.atan2(dy1, dx1);\r\n const a2 = Math.atan2(dy2, dx2);\r\n const deg = -(((a2 - a1) * 180) / Math.PI + 360) % 360;\r\n const thershold = -25.0;\r\n if (deg < thershold) {\r\n return thershold;\r\n }\r\n return deg;\r\n};\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { NextBokningTitle } from '../nextBokningTitle';\r\n\r\nimport { SitecoreDictionary } from 'models/SitecoreDictionary';\r\nimport { BookingItemContainer } from 'components/common';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface BookedPassProps {\r\n booking: fos.api.Bokning;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport const BookedPass: React.SFC = props => {\r\n const getTitle = () => {\r\n const startTime = moment(props.booking.StartTime);\r\n const diffInDays = startTime.startOf('day').diff(moment().startOf('day'), 'days');\r\n const relativeTime = startTime.calendar().split(' ')[0];\r\n const formatedDay = startTime.format('dddd');\r\n const day: string = diffInDays < 2 ? relativeTime.toLocaleLowerCase() : 'på ' + formatedDay;\r\n return `${props.translate(SitecoreDictionary.StartPage.NextPass)} - ${day}`;\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { NoBookedPass } from './noBookedPass';\r\n\r\nimport { BookedPass } from './bookedPass';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface NextBokningDataProps {\r\n pass?: fos.api.Bokning;\r\n className?: string;\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n}\r\nexport interface NextBokningActionProps {\r\n goToScheduleMobile: () => void;\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n}\r\n\r\nexport type NextBokningProps = NextBokningDataProps & NextBokningActionProps;\r\n\r\nexport class NextBokning extends React.Component {\r\n // onScheduleClick() {\r\n // this.props.openSidebarSchedule();\r\n // this.props.showSidebar();\r\n // }\r\n render() {\r\n return (\r\n
\r\n {!this.props.pass ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconCalendar, IconMenuBookedSessions } from 'components/icons';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Bow } from 'components/common';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface MobileLinksProps {\r\n goToSchema: () => void;\r\n goToBookings: () => void;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport const MobileLinks: React.SFC = props => (\r\n
\r\n
\r\n
props.goToBookings()}>\r\n
\r\n \r\n \r\n
\r\n \r\n {props.translate(SitecoreDictionary.StartPage.ShowBokningar)}\r\n \r\n
\r\n
props.goToSchema()}>\r\n
\r\n \r\n \r\n
\r\n \r\n {props.translate(SitecoreDictionary.StartPage.OpenSchema)}\r\n \r\n
\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\nexport interface PassItemSkeletonProps {\r\n maxAmountOfPassItemsPerDay: number;\r\n}\r\n\r\nexport class PassItemSkeleton extends React.Component {\r\n getNumberOfDays = () => {\r\n let numberOfDays;\r\n\r\n if (this.props.maxAmountOfPassItemsPerDay > 0) {\r\n numberOfDays = this.props.maxAmountOfPassItemsPerDay;\r\n } else {\r\n numberOfDays = 3;\r\n }\r\n\r\n return numberOfDays;\r\n };\r\n\r\n render() {\r\n return Array.from({ length: this.getNumberOfDays() }, (_, num) => (\r\n
\r\n
\r\n
\r\n
\r\n

\r\n

\r\n

\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n {/* eslint-disable jsx-a11y/heading-has-content */}\r\n

\r\n

\r\n
\r\n

\r\n

\r\n

\r\n
\r\n\r\n
\r\n
\r\n
\r\n ));\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { PassItemSkeleton } from './PassItemSkeleton';\r\n\r\nexport interface PassItemSkeletonProps {\r\n numberOfDays: number;\r\n maxAmountOfPassItemsPerDay: number;\r\n}\r\n\r\nexport class PassListSkeleton extends React.Component {\r\n render() {\r\n return (\r\n
\r\n {Array.from({ length: this.props.numberOfDays }, (_, num) => (\r\n
\r\n
\r\n \r\n
\r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Banner } from 'components/common';\r\n\r\nimport background from 'static/assets/start_sida.jpg';\r\nimport { NextBokning } from '../nextBokning';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { PassListSkeleton } from '../../common/pass-list-skeleton/PassListSkeleton';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface StartPageDesktopBannerProps {\r\n nextBokning?: fos.api.Bokning;\r\n translate: TranslateFunction;\r\n BookingsFetched?: boolean;\r\n userName?: string;\r\n}\r\nexport interface StartPageDesktopActionProps {\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n goToScheduleMobile: () => void;\r\n}\r\n\r\nexport type StartPageDesktopProps = StartPageDesktopBannerProps & StartPageDesktopActionProps;\r\n\r\nexport class StartPageDesktopBanner extends React.Component {\r\n render() {\r\n return (\r\n \r\n {\r\n \r\n

\r\n {this.props.translate(SitecoreDictionary.StartPage.Greetings)}\r\n {this.props.userName && (\r\n \r\n
\r\n {this.props.userName}\r\n
\r\n )}\r\n !\r\n

\r\n
\r\n }\r\n
\r\n {this.props.BookingsFetched && (\r\n \r\n )}\r\n {!this.props.BookingsFetched && }\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { LocationActionTypes } from 'store/location';\r\nimport calendarIcon from 'static/assets/icon-startpage-calender.svg';\r\nimport notiserIcon from 'static/assets/icon-startpage-notifications.svg';\r\nimport traeningsstatistikIcon from 'static/assets/icon-startpage-statistics.svg';\r\nimport traeningsstaellenIcon from 'static/assets/icon-startpage-facilities.svg';\r\nimport onlineTreaningsIcon from 'static/assets/icon-online-training.svg';\r\nimport nyheterIcon from 'static/assets/icon-startpage-news.svg';\r\nimport medlemskapIcon from 'static/assets/icon-startpage-membership.svg';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface DesktopLinksActionProps {\r\n switchView: (location: LocationActionTypes) => void;\r\n translate: TranslateFunction;\r\n inloggadFoerening?: fos.api.InloggadeFoerening;\r\n}\r\n\r\nexport type DesktopLinksProps = DesktopLinksActionProps;\r\ntype linkType = {\r\n location: LocationActionTypes;\r\n icon: string;\r\n title: string;\r\n};\r\n\r\nexport const DesktopLinks: React.SFC = props => {\r\n let onlineTraining = false;\r\n if (\r\n !!props.inloggadFoerening &&\r\n !!props.inloggadFoerening.ExtraFoereningInfo &&\r\n !!props.inloggadFoerening.ExtraFoereningInfo.OnlineTrainingUrl\r\n ) {\r\n onlineTraining = true;\r\n }\r\n const links: linkType[] = [\r\n {\r\n location: LocationActionTypes.Bookings,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.Bookings) as string,\r\n icon: calendarIcon,\r\n },\r\n {\r\n location: LocationActionTypes.Notifications,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.Notifications) as string,\r\n icon: notiserIcon,\r\n },\r\n {\r\n location: LocationActionTypes.Statistics,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.TrainingStatistics) as string,\r\n icon: traeningsstatistikIcon,\r\n },\r\n {\r\n location: LocationActionTypes.Facilities,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.Facilities) as string,\r\n icon: traeningsstaellenIcon,\r\n },\r\n {\r\n location: LocationActionTypes.News,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.News) as string,\r\n icon: nyheterIcon,\r\n },\r\n {\r\n location: LocationActionTypes.Subscriptions,\r\n title: props.translate(SitecoreDictionary.StartPage.Menu.Subsctiptions) as string,\r\n icon: medlemskapIcon,\r\n },\r\n ];\r\n\r\n return (\r\n
\r\n
\r\n {/* ONLINETRÄNING */}\r\n {onlineTraining && (\r\n \r\n
\r\n {\"Onlineträning\"}\r\n
\r\n
\r\n {props.translate(SitecoreDictionary.MainMenu.OnlineTraining)}\r\n
\r\n \r\n )}\r\n {links.map((link, index) => (\r\n \r\n {!(onlineTraining && link.location === LocationActionTypes.News) && (\r\n props.switchView(link.location)}\r\n >\r\n
\r\n \"Meny\"\r\n
\r\n
{link.title}
\r\n
\r\n )}\r\n \r\n ))}\r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { TranslateIfSpecialIntresse } from 'utils';\r\nimport { formatDate } from 'websd/utils';\r\n\r\nexport interface NewsItemDataProps {\r\n title: string;\r\n text: string;\r\n imageUrl: string;\r\n date: string;\r\n tags: Array;\r\n url: string;\r\n}\r\n\r\nconst NewsItem: React.SFC = (props: NewsItemDataProps) => {\r\n const fosURL = process.env.REACT_APP_FOS_URL as string;\r\n const imageUrl = fosURL + props.imageUrl;\r\n const itemUrl = fosURL + props.url;\r\n const specialTag = 'Show All Users';\r\n\r\n return (\r\n \r\n \r\n
\r\n
\r\n
\r\n
{props.title}
\r\n
\r\n
\r\n

{props.text}

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {props.tags.map(\r\n (t, i) =>\r\n t !== specialTag && (\r\n
\r\n {TranslateIfSpecialIntresse(t)}\r\n
\r\n )\r\n )}\r\n
\r\n
{formatDate(props.date)}
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default NewsItem;\r\n","import * as React from 'react';\r\nimport NewsItem from './NewsItem';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { Spinner } from 'components/common/Spinner';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface NewsPassedProps {\r\n readonly startPageMode?: boolean;\r\n}\r\n\r\nexport interface NewsDataProps {\r\n news: Array;\r\n fetchState: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface NewsActionProps {\r\n fetchNews: () => void;\r\n}\r\n\r\ntype NewsProps = NewsDataProps & NewsActionProps & NewsPassedProps;\r\n\r\nexport class News extends React.Component {\r\n componentDidMount() {\r\n this.props.fetchNews();\r\n }\r\n\r\n render() {\r\n if (this.props.fetchState === EntityStatus.FETCHING) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n {this.props.startPageMode && this.props.news !== null && this.props.news.length > 0 && (\r\n
\r\n

\r\n {this.props.translate(SitecoreDictionary.MainMenu.News)}\r\n

\r\n
\r\n )}\r\n {this.props.news &&\r\n this.props.news.map((n, i) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n }\r\n}\r\n","import { getEntityStatus } from 'store/global/fetch/fetchSelectors';\r\nimport { NewsDataProps, NewsActionProps, News } from './News';\r\nimport { RootState } from 'store';\r\nimport { fetchNews } from 'store/news';\r\nimport { connect } from 'react-redux';\r\nimport { FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapState = (state: RootState): NewsDataProps => ({\r\n news: state.news.news,\r\n translate: getTranslate(state.locale),\r\n fetchState: getEntityStatus(\r\n state.global.fetch,\r\n state.global.session.userId as number,\r\n FetchStatusAggregateTypes.NEWS\r\n ),\r\n});\r\n\r\nconst mapDispatch: NewsActionProps = {\r\n fetchNews,\r\n};\r\n\r\nexport default connect(mapState, mapDispatch)(News);\r\n","import * as React from 'react';\r\nimport { NextBokning } from './nextBokning';\r\nimport { MobileLinks } from './mobileLinks';\r\n\r\nimport { StartPageDesktopBanner } from './startPageDesktopBanner';\r\nimport { LocationActionTypes } from 'store/location';\r\nimport { DesktopLinks } from './desktopLinks';\r\nimport { PassListSkeleton } from '../common/pass-list-skeleton/PassListSkeleton';\r\nimport { IconChevron } from '../icons';\r\nimport News from 'components/news';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface StartDataProps {\r\n nextBokning?: fos.api.Bokning;\r\n translate: TranslateFunction;\r\n hasFetchedBokningarOnce: boolean;\r\n fetchBokningarStatus?: EntityStatus;\r\n fetchPassListStatus?: EntityStatus;\r\n isDesktopMode?: boolean;\r\n userName?: string;\r\n aktivFoerening?: number;\r\n isAuthenticated: boolean;\r\n news: Array;\r\n inloggadFoerening?: fos.api.InloggadeFoerening;\r\n}\r\n\r\nexport interface StartActionProps {\r\n getNextBokning: () => void;\r\n getPassList: (aktivFoerening: number) => void;\r\n fetchBokningar: () => void;\r\n goToSchema: () => void;\r\n goToBookings: () => void;\r\n switchView: (location: LocationActionTypes) => void;\r\n getProfileInfo: (aktivFoerening: number) => void;\r\n redirectTo: (location: LocationActionTypes) => void;\r\n setSidebarToContainSchedule: () => void;\r\n setSidebarToVisible: () => void;\r\n getNewNotificationsCount: () => void;\r\n goToScheduleMobile: () => void;\r\n}\r\n\r\nexport type StartProps = StartDataProps & StartActionProps;\r\n\r\nexport class Start extends React.Component {\r\n setNewsRef: (element: Element | null) => void;\r\n news: Element | null = null;\r\n constructor(props: StartProps) {\r\n super(props);\r\n\r\n this.setNewsRef = element => {\r\n this.news = element;\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (!this.props.isAuthenticated) {\r\n this.props.redirectTo(LocationActionTypes.Login);\r\n return;\r\n }\r\n this.props.getNewNotificationsCount();\r\n this.props.getNextBokning();\r\n if (this.props.aktivFoerening) {\r\n if (!this.props.isDesktopMode) {\r\n this.props.getPassList(this.props.aktivFoerening);\r\n }\r\n this.props.getProfileInfo(this.props.aktivFoerening);\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n if (\r\n this.props.fetchBokningarStatus === undefined ||\r\n (this.props.fetchBokningarStatus !== EntityStatus.FETCHING &&\r\n this.props.fetchBokningarStatus !== EntityStatus.FETCHING_IN_BACKGROUND &&\r\n this.props.fetchBokningarStatus !== EntityStatus.SUCCESS)\r\n ) {\r\n this.props.fetchBokningar();\r\n }\r\n }\r\n\r\n scrollToNews() {\r\n if (this.news) {\r\n const scrollToValue = this.news.clientTop;\r\n window.scrollTo({ behavior: 'smooth', top: scrollToValue });\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n {this.props.isDesktopMode && (\r\n \r\n )}\r\n {!this.props.isDesktopMode &&\r\n this.props.fetchBokningarStatus === EntityStatus.SUCCESS &&\r\n this.props.fetchPassListStatus === EntityStatus.SUCCESS && (\r\n \r\n )}\r\n {!this.props.isDesktopMode && this.props.fetchBokningarStatus !== EntityStatus.SUCCESS && (\r\n \r\n )}\r\n {this.props.isDesktopMode && (\r\n \r\n )}\r\n
\r\n \r\n \r\n \r\n {this.props.news !== null && this.props.news.length > 0 && (\r\n
this.scrollToNews()}>\r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private getMainContainerClasses(): string {\r\n let className: string = 'StartPage';\r\n if (this.props.isDesktopMode) {\r\n className += ' StartPage--noBackground StartPage--Desktop';\r\n }\r\n return className;\r\n }\r\n private getMainContentClasses(): string {\r\n let className: string = 'StartPage__Content';\r\n if (this.props.isDesktopMode) {\r\n className += ' StartPage__Content--Desktop';\r\n }\r\n return className;\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { Start, StartDataProps, StartActionProps } from './Start';\r\nimport { getNextBokning, getBookingsInBackground } from 'store/bokningar';\r\nimport { switchView, LocationActionTypes, redirectTo, goToSchedule } from 'store/location';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { FetchStatusAggregateTypes, getEntityStatus } from 'store/global/fetch';\r\nimport { getProfileInfo } from 'store/user';\r\n\r\nimport { SideBarAction } from 'store/global/ui/side-bar/sideBarActions';\r\nimport { SidebarStatus, SidebarContentType } from '../../store/global/ui/side-bar/sideBarReducer';\r\nimport { fetchNewNotificationsCount } from 'store/global/ui/newNotification';\r\nimport { fetchPassListInForeground } from 'store/pass';\r\n\r\nconst setSidebarToContainSchedule = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_CONTENT_TYPE',\r\n contentType: SidebarContentType.SCHEDULE,\r\n });\r\n};\r\n\r\nconst setSidebarToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_LAUNCH',\r\n visibility: SidebarStatus.SHOWING,\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): StartDataProps => {\r\n const inloggadFoerening = state.global.session.inloggadeFoereningar.find(\r\n f => '' + f.Id === '' + state.global.session.activeFoerening\r\n );\r\n return {\r\n news: state.news.news,\r\n nextBokning: state.bokningar.nextBokning,\r\n hasFetchedBokningarOnce: state.bokningar.hasFetchedBokningarOnce,\r\n translate: getTranslate(state.locale),\r\n fetchBokningarStatus: state.global.session.userId\r\n ? getEntityStatus(state.global.fetch, state.global.session.userId, FetchStatusAggregateTypes.BOKNING)\r\n : undefined,\r\n fetchPassListStatus: state.global.session.activeFoerening\r\n ? getEntityStatus(state.global.fetch, state.global.session.activeFoerening, FetchStatusAggregateTypes.PASS_LIST)\r\n : undefined,\r\n aktivFoerening: state.global.session.activeFoerening,\r\n userName: state.user.read.user.FirstName,\r\n isAuthenticated: !!state.auth.read.isAuthenticated,\r\n inloggadFoerening,\r\n };\r\n};\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): StartActionProps => ({\r\n getNextBokning: () => dispatch(getNextBokning()),\r\n getPassList: (aktivFoerening: number) => dispatch(fetchPassListInForeground(aktivFoerening)),\r\n fetchBokningar: () => dispatch(getBookingsInBackground()),\r\n goToSchema: () => {\r\n dispatch(setSidebarToContainSchedule());\r\n dispatch(setSidebarToVisible());\r\n },\r\n goToBookings: () => dispatch(switchView(LocationActionTypes.Bookings)),\r\n switchView: (location: LocationActionTypes) => dispatch(switchView(location)),\r\n getProfileInfo: (aktivFoerening: number) => dispatch(getProfileInfo(aktivFoerening)),\r\n redirectTo: (location: LocationActionTypes) => dispatch(redirectTo(location)),\r\n setSidebarToContainSchedule: () => dispatch(setSidebarToContainSchedule()),\r\n setSidebarToVisible: () => dispatch(setSidebarToVisible()),\r\n getNewNotificationsCount: () => dispatch(fetchNewNotificationsCount()),\r\n goToScheduleMobile: () => dispatch(goToSchedule()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapActionsToProps)(Start);\r\n","import * as React from 'react';\r\nimport { NavLink } from 'redux-first-router-link';\r\n\r\nexport interface FancyNavLinkState {\r\n isActive: boolean;\r\n}\r\n\r\nexport interface FancyNavLinkProps {\r\n to: string;\r\n exact?: boolean;\r\n className?: string;\r\n children?: string | JSX.Element | Array;\r\n isTargetBlank?: boolean;\r\n clickHandler?: (event: React.MouseEvent) => void;\r\n}\r\n\r\nexport type FancyNavLinkAllProps = FancyNavLinkProps;\r\n\r\nexport class FancyNavLink extends React.Component {\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FoereningarReadState } from '../../store/foereningar/read';\r\nimport { SelectInput } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { SelectInputOption } from 'components/common/SelectInput';\r\n\r\nexport interface FoereningarListProps {\r\n readonly foereningar: FoereningarReadState;\r\n readonly labelColor: string;\r\n readonly shouldValidate?: boolean;\r\n readonly theme?: string;\r\n readonly disabled?: boolean;\r\n readonly onChange: (foereningId: number) => void;\r\n readonly tabindex?: number;\r\n readonly translate: TranslateFunction;\r\n readonly value: number;\r\n}\r\n\r\ninterface FoereningarListState {\r\n isValid?: boolean;\r\n}\r\n\r\nexport class FoereningarList extends React.Component {\r\n constructor(props: FoereningarListProps) {\r\n super(props);\r\n this.state = {\r\n isValid: false,\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n -1}\r\n options={this.mapFoereningar()}\r\n onValueChange={value => this.onChange(value)}\r\n theme={this.props.theme ? this.props.theme : ''}\r\n disabled={this.props.disabled}\r\n tabindex={this.props.tabindex}\r\n />\r\n );\r\n }\r\n\r\n private mapFoereningar(): SelectInputOption[] {\r\n const options: SelectInputOption[] = [\r\n {\r\n value: -1,\r\n isDisabled: true,\r\n label: this.props.translate(SitecoreDictionary.Login.SelectFoerening) as string,\r\n },\r\n ];\r\n this.props.foereningar.Foereningar.forEach(f =>\r\n options.push({\r\n value: f.Id,\r\n label: f.DisplayName,\r\n })\r\n );\r\n return options;\r\n }\r\n\r\n private onChange(value: string): void {\r\n const foereningId: number = parseInt(value, 10);\r\n this.props.onChange(foereningId);\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from '../../store';\r\nimport { FoereningarList, FoereningarListProps } from './FoereningarList';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\ninterface FoereningarListContainerProps {\r\n readonly labelColor: string;\r\n readonly shouldValidate?: boolean;\r\n onChange: (foereningId: number) => void;\r\n theme?: string;\r\n disabled?: boolean;\r\n tabindex?: number;\r\n value: number;\r\n}\r\n\r\nconst mapStateToProps = (state: RootState, props: FoereningarListContainerProps): FoereningarListProps => {\r\n return {\r\n labelColor: props.labelColor,\r\n foereningar: state.foereningar.read,\r\n onChange: props.onChange,\r\n translate: getTranslate(state.locale),\r\n shouldValidate: props.shouldValidate,\r\n disabled: props.disabled,\r\n tabindex: props.tabindex,\r\n value: props.value,\r\n };\r\n};\r\n\r\nexport const FoereningarListContainer = connect(mapStateToProps)(FoereningarList);\r\n","import * as React from 'react';\r\n\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as Location } from 'store/location/locationActions';\r\nimport { FoereningarListContainer } from 'components/foereningarList';\r\nimport { EmailInput, MainInput, MainButton, Logotyp } from 'components/common';\r\nimport { StatusBar } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Spinner } from '../common/Spinner';\r\nimport { sitecoreUtils } from 'utils/sitecoreIntegration';\r\nimport { SiteSwitcherState } from 'store/global/ui/siteswitcher';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface LoginDataProps {\r\n readonly isExecutingFailed: boolean;\r\n readonly isExecuting: boolean;\r\n siteSwitcherState: SiteSwitcherState;\r\n isSiteSwitcherShowing: boolean;\r\n isVisitingShop: boolean;\r\n translate: TranslateFunction;\r\n username: string;\r\n password: string;\r\n languageId: number;\r\n foereningId: number;\r\n ProductsInBasket?: number | undefined;\r\n}\r\n\r\nexport interface LoginPassedProps {\r\n publicScheduleMode: boolean;\r\n passId: number | string;\r\n bokaKoePlats: boolean;\r\n title: string;\r\n}\r\n\r\nexport interface LoginActionProps {\r\n updateUsername: (email: string) => void;\r\n updatePassword: (password: string) => void;\r\n updateFoereningId: (foereningId: number) => void;\r\n onLogin: (credentials: fos.api.Credentials) => void;\r\n goToLogin: () => void;\r\n loginFromSchedule: (credentials: fos.api.Credentials, passId: string | number, bokaKoePlats: boolean) => void;\r\n clearLoginCmd: () => void;\r\n setFoereningIdFromQueryParameter: () => void;\r\n setSiteSwitcherToVisible: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n}\r\n\r\nexport type LoginComponentProps = LoginActionProps & LoginDataProps & LoginPassedProps;\r\n\r\ninterface CredentialsState {\r\n UsernameIsValid?: boolean;\r\n statusMessageVisible: boolean;\r\n\r\n // Used to animate status message bar\r\n statusMessageClass: string;\r\n publicScheduleLoginExpanded: boolean;\r\n}\r\n\r\n// TODO: Use localisation for text strings.\r\nexport class Login extends React.Component {\r\n errorStatusClass = 'StatusMessage--BlackRoundedCorners';\r\n\r\n private checkAutoCompleteIntervalHandle: number | undefined;\r\n private emailEl: HTMLInputElement | undefined;\r\n private passwordEl: HTMLInputElement | undefined;\r\n private ignoreAutoCheck: boolean | undefined;\r\n\r\n constructor(props: LoginComponentProps) {\r\n super(props);\r\n\r\n this.state = {\r\n statusMessageVisible: false,\r\n statusMessageClass: this.errorStatusClass,\r\n publicScheduleLoginExpanded: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.publicScheduleMode) {\r\n this.props.setFoereningIdFromQueryParameter();\r\n }\r\n this.checkAutoCompleteIntervalHandle = window.setInterval(this.checkForAutoComplete.bind(this), 1000);\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: LoginDataProps) {\r\n if (newProps.isExecutingFailed) {\r\n this.setState({\r\n statusMessageVisible: true,\r\n });\r\n }\r\n return true;\r\n }\r\n\r\n componentWillUnmount() {\r\n clearInterval(this.checkAutoCompleteIntervalHandle);\r\n this.props.clearLoginCmd();\r\n }\r\n\r\n getVisibleStatus() {\r\n if (this.state.statusMessageVisible) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getPublicScheduleClasses() {\r\n let psClasses = '';\r\n if (this.props.publicScheduleMode) {\r\n psClasses += ' Login--scrollLocked';\r\n if (!this.state.publicScheduleLoginExpanded) {\r\n psClasses += ' Login--collapsed';\r\n } else if (this.state.publicScheduleLoginExpanded) {\r\n psClasses += ' Login--expanded';\r\n }\r\n }\r\n return psClasses;\r\n }\r\n\r\n expandLoginForm() {\r\n this.setState({\r\n publicScheduleLoginExpanded: !this.state.publicScheduleLoginExpanded,\r\n });\r\n }\r\n\r\n render() {\r\n this.ignoreAutoCheck = false;\r\n return (\r\n
\r\n {this.props.publicScheduleMode && (\r\n
\r\n {!this.state.publicScheduleLoginExpanded && (\r\n

{this.props.translate(SitecoreDictionary.Login.WhoYouAre)}

\r\n )}\r\n {this.state.publicScheduleLoginExpanded && }\r\n {!this.state.publicScheduleLoginExpanded && (\r\n
this.expandLoginForm()}>\r\n {this.props.translate(SitecoreDictionary.Login.IdentifyYourSelf)}\r\n
\r\n )}\r\n
\r\n )}\r\n {!this.props.publicScheduleMode && }\r\n {(this.state.publicScheduleLoginExpanded || !this.props.publicScheduleMode) && (\r\n
\r\n {this.props.isExecuting && }\r\n\r\n {!this.props.isExecuting && (\r\n
this.submit(event)} name=\"Login\">\r\n
\r\n this.handleEmailChange(value as string)}\r\n onValidChanged={isValid => this.handleEmailIsValidChange(isValid)}\r\n autocomplete=\"username\"\r\n autoCorrect=\"off\"\r\n tabindex={1}\r\n />\r\n this.handlePasswordChange(value as string)}\r\n tabindex={2}\r\n />\r\n\r\n {!this.props.publicScheduleMode && !this.props.isVisitingShop && (\r\n \r\n this.handleFoereningChange(foreningId)}\r\n tabindex={3}\r\n value={this.props.foereningId}\r\n />\r\n

\r\n {this.props.translate(SitecoreDictionary.Login.FoereningSelectMessage)}\r\n

\r\n
\r\n )}\r\n \r\n\r\n
\r\n \r\n {!this.props.publicScheduleMode && ( // We do not want to allow re-setting of password in public mode as this brings complications which are best avoided for now\r\n

\r\n \r\n {this.props.translate(SitecoreDictionary.Login.ForgotPassword) as string}\r\n \r\n

\r\n )}\r\n
\r\n
\r\n
\r\n )}\r\n {// byt namn this.props.sitecoremode till publicschedule mode\r\n sitecoreUtils.isIframedInSitecore() && !this.props.publicScheduleMode && (\r\n sitecoreUtils.onHideLoginSignal()}\r\n buttonStyle=\"solid\"\r\n color=\"white\"\r\n title={this.props.translate(SitecoreDictionary.Login.GoBack) as string}\r\n className=\"Button\"\r\n tabindex={4}\r\n />\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n }\r\n\r\n private shouldDisableSubmit(): boolean {\r\n return (\r\n this.props.password === null ||\r\n this.props.password === '' ||\r\n !this.state.UsernameIsValid ||\r\n !this.props.foereningId ||\r\n this.props.foereningId < 1\r\n );\r\n }\r\n\r\n private submit(event: React.FormEvent) {\r\n event.preventDefault();\r\n const credentials: fos.api.Credentials = {\r\n Username: this.props.username,\r\n Password: this.props.password,\r\n FoereningId: this.props.foereningId,\r\n LanguageId: this.props.languageId,\r\n CalendarSync: false,\r\n LoginToToBuy: false,\r\n ProductsInBasket: this.props.ProductsInBasket,\r\n };\r\n\r\n if (this.props.publicScheduleMode) {\r\n this.props.loginFromSchedule(credentials, this.props.passId, this.props.bokaKoePlats);\r\n } else {\r\n this.props.onLogin(credentials);\r\n }\r\n }\r\n\r\n private handleEmailChange(username: string) {\r\n this.ignoreAutoCheck = true;\r\n this.props.updateUsername(username);\r\n }\r\n\r\n private handleEmailIsValidChange(UsernameIsValid: boolean) {\r\n this.setState({ UsernameIsValid });\r\n }\r\n\r\n private handlePasswordChange(password: string) {\r\n this.ignoreAutoCheck = true;\r\n this.props.updatePassword(password);\r\n }\r\n\r\n private handleFoereningChange(foereningId: number) {\r\n this.props.updateFoereningId(foereningId);\r\n }\r\n\r\n private updateEmailAndPasswordReferences() {\r\n this.emailEl = document.getElementById('LoginFormEmail') as HTMLInputElement;\r\n this.passwordEl = document.getElementById('LoginFormPassword') as HTMLInputElement;\r\n }\r\n\r\n private checkForAutoComplete() {\r\n this.updateEmailAndPasswordReferences();\r\n if (!this.emailEl || !this.passwordEl) {\r\n return;\r\n }\r\n if (this.ignoreAutoCheck) {\r\n return;\r\n }\r\n const emailDomValue = this.emailEl.value;\r\n const passwordDomValue = this.passwordEl.value;\r\n if (emailDomValue !== this.props.username) {\r\n this.props.updateUsername(emailDomValue);\r\n }\r\n\r\n if (passwordDomValue !== this.props.password) {\r\n this.props.updatePassword(passwordDomValue);\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { Login, LoginDataProps, LoginActionProps } from './Login';\r\nimport { loginWithCreds, loginFromSchedule } from 'store/auth';\r\nimport { getIsExecutingFailed, FetchCommandTypes, getIsExecuting } from 'store/global/fetch';\r\nimport { SiteSwitcherAction, SiteSwitcherStatus } from 'store/global/ui/siteswitcher';\r\nimport { LocationActionTypes, switchView } from 'store/location';\r\n\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport {\r\n updateEmail,\r\n updateFoereningId,\r\n updatePassword,\r\n clearLoginCmd,\r\n setFoereningIdFromQueryParameter,\r\n} from 'store/auth/loginCmd';\r\nimport { getQueryStringValue, constructSafeName } from 'utils';\r\n\r\nconst setSiteSwitcherToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW',\r\n });\r\n};\r\n\r\nconst setSiteSwitcherToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_HIDE',\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): LoginDataProps => {\r\n const foereningNamnFromQuery = getQueryStringValue('foerening');\r\n const foereningFromQuery = state.foereningar.read.Foereningar.find(\r\n f =>\r\n constructSafeName(f.Namn.toLowerCase()) ===\r\n constructSafeName(decodeURIComponent(foereningNamnFromQuery.toLowerCase()))\r\n );\r\n const foereningIdFromQuery = !!foereningFromQuery ? foereningFromQuery.Id : undefined;\r\n const foereningId = !!state.global.session.shopFoerening\r\n ? state.global.session.shopFoerening\r\n : state.auth.loginCmd.foereningId > 0\r\n ? state.auth.loginCmd.foereningId\r\n : !!foereningIdFromQuery\r\n ? foereningIdFromQuery\r\n : -1;\r\n return {\r\n isExecutingFailed: getIsExecutingFailed(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN),\r\n isExecuting: getIsExecuting(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN),\r\n translate: getTranslate(state.locale),\r\n username: state.auth.loginCmd.email,\r\n password: state.auth.loginCmd.password,\r\n foereningId,\r\n languageId: state.global.ui.language.id,\r\n siteSwitcherState: props.SiteSwitcherState,\r\n isSiteSwitcherShowing: state.global.ui.siteSwitcher.visibility === SiteSwitcherStatus.SHOWING,\r\n isVisitingShop: !!state.global.session.shopFoerening && state.global.session.shopFoerening !== foereningId,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): LoginActionProps => ({\r\n onLogin: credentials => dispatch(loginWithCreds(credentials)),\r\n goToLogin: () => dispatch(switchView(LocationActionTypes.Home)),\r\n loginFromSchedule: (credentials, passId, bokaKoePlats) =>\r\n dispatch(loginFromSchedule(credentials, passId, bokaKoePlats)),\r\n updateUsername: username => dispatch(updateEmail(username)),\r\n updatePassword: password => dispatch(updatePassword(password)),\r\n updateFoereningId: foereningId => dispatch(updateFoereningId(foereningId)),\r\n clearLoginCmd: () => dispatch(clearLoginCmd()),\r\n setFoereningIdFromQueryParameter: () => dispatch(setFoereningIdFromQueryParameter()),\r\n setSiteSwitcherToVisible: () => dispatch(setSiteSwitcherToVisible()),\r\n setSiteSwitcherToHidden: () => dispatch(setSiteSwitcherToHidden()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Login);\r\n","import * as React from 'react';\r\n\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as Location } from 'store/location/locationActions';\r\nimport { FoereningarListContainer } from 'components/foereningarList';\r\nimport { EmailInput, MainInput, MainButton, Logotyp } from 'components/common';\r\nimport { StatusBar } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Spinner } from '../common/Spinner';\r\nimport { sitecoreUtils } from 'utils/sitecoreIntegration';\r\nimport { SiteSwitcherState } from 'store/global/ui/siteswitcher';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AdminLoginDataProps {\r\n readonly isExecutingFailed: boolean;\r\n readonly isExecuting: boolean;\r\n siteSwitcherState: SiteSwitcherState;\r\n isSiteSwitcherShowing: boolean;\r\n translate: TranslateFunction;\r\n username: string;\r\n password: string;\r\n languageId: number;\r\n foereningId: number;\r\n ProductsInBasket?: number | undefined;\r\n}\r\n\r\nexport interface AdminLoginPassedProps {\r\n publicScheduleMode: boolean;\r\n passId: number | string;\r\n bokaKoePlats: boolean;\r\n title: string;\r\n}\r\n\r\nexport interface AdminLoginActionProps {\r\n updateUsername: (email: string) => void;\r\n updatePassword: (password: string) => void;\r\n updateFoereningId: (foereningId: number) => void;\r\n onLogin: (credentials: fos.api.Credentials) => void;\r\n goToLogin: () => void;\r\n loginFromSchedule: (credentials: fos.api.Credentials, passId: string | number, bokaKoePlats: boolean) => void;\r\n clearLoginCmd: () => void;\r\n setFoereningIdFromQueryParameter: () => void;\r\n setSiteSwitcherToVisible: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n}\r\n\r\nexport type AdminLoginComponentProps = AdminLoginActionProps & AdminLoginDataProps & AdminLoginPassedProps;\r\n\r\ninterface CredentialsState {\r\n UsernameIsValid?: boolean;\r\n statusMessageVisible: boolean;\r\n\r\n // Used to animate status message bar\r\n statusMessageClass: string;\r\n publicScheduleLoginExpanded: boolean;\r\n}\r\n\r\n// TODO: Use localisation for text strings.\r\nexport class AdminLogin extends React.Component {\r\n errorStatusClass = 'StatusMessage--BlackRoundedCorners';\r\n\r\n private checkAutoCompleteIntervalHandle: number | undefined;\r\n private emailEl: HTMLInputElement | undefined;\r\n private passwordEl: HTMLInputElement | undefined;\r\n private ignoreAutoCheck: boolean | undefined;\r\n\r\n constructor(props: AdminLoginComponentProps) {\r\n super(props);\r\n\r\n this.state = {\r\n statusMessageVisible: false,\r\n statusMessageClass: this.errorStatusClass,\r\n publicScheduleLoginExpanded: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.publicScheduleMode) {\r\n this.props.setFoereningIdFromQueryParameter();\r\n }\r\n this.checkAutoCompleteIntervalHandle = window.setInterval(this.checkForAutoComplete.bind(this), 1000);\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: AdminLoginDataProps) {\r\n if (newProps.isExecutingFailed) {\r\n this.setState({\r\n statusMessageVisible: true,\r\n });\r\n }\r\n return true;\r\n }\r\n\r\n componentWillUnmount() {\r\n clearInterval(this.checkAutoCompleteIntervalHandle);\r\n this.props.clearLoginCmd();\r\n }\r\n\r\n getVisibleStatus() {\r\n if (this.state.statusMessageVisible) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getPublicScheduleClasses() {\r\n let psClasses = '';\r\n if (this.props.publicScheduleMode) {\r\n psClasses += ' Login--scrollLocked';\r\n if (!this.state.publicScheduleLoginExpanded) {\r\n psClasses += ' Login--collapsed';\r\n } else if (this.state.publicScheduleLoginExpanded) {\r\n psClasses += ' Login--expanded';\r\n }\r\n }\r\n return psClasses;\r\n }\r\n\r\n expandLoginForm() {\r\n this.setState({\r\n publicScheduleLoginExpanded: !this.state.publicScheduleLoginExpanded,\r\n });\r\n }\r\n\r\n render() {\r\n this.ignoreAutoCheck = false;\r\n return (\r\n
\r\n {this.props.publicScheduleMode && (\r\n
\r\n

{this.props.translate(SitecoreDictionary.Login.Hi)}

\r\n

{this.props.translate(SitecoreDictionary.Login.WhoYouAre)}

\r\n {!this.state.publicScheduleLoginExpanded && (\r\n
this.expandLoginForm()}>\r\n {this.props.translate(SitecoreDictionary.Login.IdentifyYourSelf)}\r\n
\r\n )}\r\n
\r\n )}\r\n {!this.props.publicScheduleMode && }\r\n {(this.state.publicScheduleLoginExpanded || !this.props.publicScheduleMode) && (\r\n
\r\n {this.props.isExecuting && }\r\n\r\n {!this.props.isExecuting && (\r\n
this.submit(event)} name=\"Login\">\r\n
\r\n this.handleEmailChange(value as string)}\r\n onValidChanged={isValid => this.handleEmailIsValidChange(isValid)}\r\n autocomplete=\"username\"\r\n autoCorrect=\"off\"\r\n tabindex={1}\r\n />\r\n this.handlePasswordChange(value as string)}\r\n tabindex={2}\r\n />\r\n\r\n {!this.props.publicScheduleMode && (\r\n this.handleFoereningChange(foreningId)}\r\n tabindex={3}\r\n value={this.props.foereningId}\r\n />\r\n )}\r\n

\r\n Saknar du din förening i listan? Föreningar lanseras löpande, håll utkik här!\r\n

\r\n \r\n\r\n
\r\n \r\n {!this.props.publicScheduleMode && ( // We do not want to allow re-setting of password in public mode as this brings complications which are best avoided for now\r\n

\r\n \r\n {this.props.translate(SitecoreDictionary.Login.ForgotPassword) as string}\r\n \r\n

\r\n )}\r\n
\r\n
\r\n
\r\n )}\r\n {// byt namn this.props.sitecoremode till publicschedule mode\r\n sitecoreUtils.isIframedInSitecore() && !this.props.publicScheduleMode && (\r\n sitecoreUtils.onHideLoginSignal()}\r\n buttonStyle=\"solid\"\r\n color=\"white\"\r\n title={this.props.translate(SitecoreDictionary.Login.GoBack) as string}\r\n className=\"Button\"\r\n tabindex={4}\r\n />\r\n )}\r\n
\r\n )}\r\n
\r\n );\r\n }\r\n\r\n private shouldDisableSubmit(): boolean {\r\n return (\r\n this.props.password === null ||\r\n this.props.password === '' ||\r\n !this.state.UsernameIsValid ||\r\n !this.props.foereningId ||\r\n this.props.foereningId < 1\r\n );\r\n }\r\n\r\n private submit(event: React.FormEvent) {\r\n event.preventDefault();\r\n const credentials: fos.api.Credentials = {\r\n Username: this.props.username,\r\n Password: this.props.password,\r\n FoereningId: this.props.foereningId,\r\n LanguageId: this.props.languageId,\r\n CalendarSync: false,\r\n LoginToToBuy: false,\r\n ProductsInBasket: this.props.ProductsInBasket,\r\n };\r\n\r\n if (this.props.publicScheduleMode) {\r\n this.props.loginFromSchedule(credentials, this.props.passId, this.props.bokaKoePlats);\r\n } else {\r\n this.props.onLogin(credentials);\r\n }\r\n }\r\n\r\n private handleEmailChange(username: string) {\r\n this.ignoreAutoCheck = true;\r\n this.props.updateUsername(username);\r\n }\r\n\r\n private handleEmailIsValidChange(UsernameIsValid: boolean) {\r\n this.setState({ UsernameIsValid });\r\n }\r\n\r\n private handlePasswordChange(password: string) {\r\n this.ignoreAutoCheck = true;\r\n this.props.updatePassword(password);\r\n }\r\n\r\n private handleFoereningChange(foereningId: number) {\r\n this.props.updateFoereningId(foereningId);\r\n }\r\n\r\n private updateEmailAndPasswordReferences() {\r\n this.emailEl = document.getElementById('LoginFormEmail') as HTMLInputElement;\r\n this.passwordEl = document.getElementById('LoginFormPassword') as HTMLInputElement;\r\n }\r\n\r\n private checkForAutoComplete() {\r\n this.updateEmailAndPasswordReferences();\r\n if (!this.emailEl || !this.passwordEl) {\r\n return;\r\n }\r\n if (this.ignoreAutoCheck) {\r\n return;\r\n }\r\n const emailDomValue = this.emailEl.value;\r\n const passwordDomValue = this.passwordEl.value;\r\n if (emailDomValue !== this.props.username) {\r\n this.props.updateUsername(emailDomValue);\r\n }\r\n\r\n if (passwordDomValue !== this.props.password) {\r\n this.props.updatePassword(passwordDomValue);\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { AdminLogin, AdminLoginDataProps, AdminLoginActionProps } from './AdminLogin';\r\nimport { loginWithCreds, loginFromSchedule } from 'store/auth';\r\nimport { getIsExecutingFailed, FetchCommandTypes, getIsExecuting } from 'store/global/fetch';\r\nimport { SiteSwitcherAction, SiteSwitcherStatus } from 'store/global/ui/siteswitcher';\r\nimport { LocationActionTypes, switchView } from 'store/location';\r\n\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport {\r\n updateEmail,\r\n updateFoereningId,\r\n updatePassword,\r\n clearLoginCmd,\r\n setFoereningIdFromQueryParameter,\r\n} from 'store/auth/loginCmd';\r\nimport { getQueryStringValue, constructSafeName } from 'utils';\r\n\r\nconst setSiteSwitcherToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW',\r\n });\r\n};\r\n\r\nconst setSiteSwitcherToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_HIDE',\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): AdminLoginDataProps => {\r\n const foereningNamnFromQuery = getQueryStringValue('foerening');\r\n const foereningFromQuery = state.foereningar.read.Foereningar.find(\r\n f =>\r\n constructSafeName(f.Namn.toLowerCase()) ===\r\n constructSafeName(decodeURIComponent(foereningNamnFromQuery.toLowerCase()))\r\n );\r\n const foereningIdFromQuery = !!foereningFromQuery ? foereningFromQuery.Id : undefined;\r\n const foereningId =\r\n state.auth.loginCmd.foereningId > 0\r\n ? state.auth.loginCmd.foereningId\r\n : !!foereningIdFromQuery\r\n ? foereningIdFromQuery\r\n : -1;\r\n return {\r\n isExecutingFailed: getIsExecutingFailed(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN),\r\n isExecuting: getIsExecuting(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN),\r\n translate: getTranslate(state.locale),\r\n username: state.auth.loginCmd.email,\r\n password: state.auth.loginCmd.password,\r\n foereningId,\r\n languageId: state.global.ui.language.id,\r\n siteSwitcherState: props.SiteSwitcherState,\r\n isSiteSwitcherShowing: state.global.ui.siteSwitcher.visibility === SiteSwitcherStatus.SHOWING,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): AdminLoginActionProps => ({\r\n onLogin: credentials => dispatch(loginWithCreds(credentials)),\r\n goToLogin: () => dispatch(switchView(LocationActionTypes.AdminLogin)),\r\n loginFromSchedule: (credentials, passId, bokaKoePlats) =>\r\n dispatch(loginFromSchedule(credentials, passId, bokaKoePlats)),\r\n updateUsername: username => dispatch(updateEmail(username)),\r\n updatePassword: password => dispatch(updatePassword(password)),\r\n updateFoereningId: foereningId => dispatch(updateFoereningId(foereningId)),\r\n clearLoginCmd: () => dispatch(clearLoginCmd()),\r\n setFoereningIdFromQueryParameter: () => dispatch(setFoereningIdFromQueryParameter()),\r\n setSiteSwitcherToVisible: () => dispatch(setSiteSwitcherToVisible()),\r\n setSiteSwitcherToHidden: () => dispatch(setSiteSwitcherToHidden()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(AdminLogin);\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface NotFoundProps {\r\n translate: TranslateFunction;\r\n}\r\n\r\nconst NotFound = (props: NotFoundProps) => (\r\n
\r\n
\r\n

404

\r\n

{props.translate(SitecoreDictionary.PageNotFound) as string}

\r\n
\r\n
\r\n);\r\n\r\nexport default NotFound;\r\n","import { getTranslate } from 'store/global/dictionary';\r\nimport NotFound, { NotFoundProps } from './NotFound';\r\nimport { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\n\r\nconst mapStateToProps = (state: RootState): NotFoundProps => ({\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nexport default connect(mapStateToProps)(NotFound);\r\n","import * as React from 'react';\r\nimport close from 'static/assets/converted-to-components/icon-big-close.svg';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as LocationAction } from 'store/location/locationActions';\r\nimport { FoereningarListContainer } from 'components/foereningarList';\r\nimport { EmailInput, MainButton } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface RequestPasswordResetActionProps {\r\n requestResetPasswordLink: (info: fos.api.PasswordResetInfo) => void;\r\n clearPasswordResetState: () => void;\r\n}\r\n\r\nexport interface RequestPasswordResetDataProps {\r\n passwordReseted?: boolean;\r\n passwordResetResult?: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\ntype RequestPasswordResetProps = RequestPasswordResetDataProps & RequestPasswordResetActionProps;\r\n\r\ninterface RequestPasswordResetState {\r\n email: string;\r\n emailIsValid?: boolean;\r\n foereningId: number;\r\n}\r\n\r\nexport class RequestPasswordReset extends React.Component {\r\n constructor(props: RequestPasswordResetProps) {\r\n super(props);\r\n this.state = {\r\n email: '',\r\n foereningId: -1,\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \"Stäng\"\r\n \r\n
\r\n
\r\n
\r\n

{this.props.translate(SitecoreDictionary.RequestResetPasswordPage.Help)}

\r\n
\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.RequestResetPasswordPage.WhoCanUseQuestion)}\r\n

{this.props.translate(SitecoreDictionary.RequestResetPasswordPage.WhoCanUseAnswer)}

\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.RequestResetPasswordPage.HowToLoginQuestion)}\r\n

{this.props.translate(SitecoreDictionary.RequestResetPasswordPage.HowToLoginAnswer)}

\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.RequestResetPasswordPage.IForgotMyPassTitle)}\r\n

{this.props.translate(SitecoreDictionary.RequestResetPasswordPage.IForgotMyPassDesc)}

\r\n
\r\n
\r\n\r\n
\r\n
this.reset(event)}>\r\n
\r\n this.handleEmailChange(value as string)}\r\n onValidChanged={isValid => this.handleEmailIsValidChange(isValid)}\r\n />\r\n
\r\n this.handleFoereningChange(foreningId)}\r\n value={this.state.foereningId}\r\n />\r\n {this.getResultMessage()}\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private handleEmailIsValidChange(emailIsValid: boolean): void {\r\n this.setState({ emailIsValid });\r\n }\r\n\r\n private handleEmailChange(email: string): void {\r\n this.clearPasswordResetState();\r\n this.setState({ email });\r\n }\r\n\r\n private handleFoereningChange(foereningId: number): void {\r\n this.clearPasswordResetState();\r\n this.setState({ foereningId });\r\n }\r\n\r\n private clearPasswordResetState(): void {\r\n if (this.props.passwordReseted !== undefined) {\r\n this.props.clearPasswordResetState();\r\n }\r\n }\r\n\r\n private shouldDisableSubmit(): boolean {\r\n if (!this.state.emailIsValid || this.state.foereningId < 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n private reset(event: React.FormEvent): void {\r\n event.preventDefault();\r\n\r\n this.props.requestResetPasswordLink({\r\n Email: this.state.email,\r\n FoereningId: this.state.foereningId,\r\n });\r\n }\r\n\r\n private getResultMessage(): JSX.Element | undefined {\r\n if (this.props.passwordReseted) {\r\n if (this.props.passwordResetResult) {\r\n return (\r\n
\r\n {this.props.translate(SitecoreDictionary.RequestResetPasswordPage.ResultSucceed)}\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n {this.props.translate(SitecoreDictionary.RequestResetPasswordPage.ResultFailed)}\r\n
\r\n );\r\n }\r\n }\r\n return;\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from '../../store';\r\nimport {\r\n RequestPasswordReset,\r\n RequestPasswordResetDataProps,\r\n RequestPasswordResetActionProps,\r\n} from './RequestPasswordReset';\r\nimport { requestResetPasswordLink, clearPasswordResetState } from 'store/global/passwordReset';\r\nimport { getTranslate } from 'react-localize-redux';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): RequestPasswordResetDataProps => ({\r\n passwordReseted: state.global.passowrdReset.passwordResetRequestCompleted,\r\n passwordResetResult: state.global.passowrdReset.requestPasswordResetLinkResult,\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nconst mapDispatchToProps: RequestPasswordResetActionProps = {\r\n requestResetPasswordLink,\r\n clearPasswordResetState,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(RequestPasswordReset);\r\n","import { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { executedCommand, executingCommandFailed, executingCommand, FetchCommandTypes } from 'store/global/fetch';\r\nimport {\r\n passwordResetLinkRequested,\r\n doClearPasswordResetState,\r\n setPasswordResetResult,\r\n PasswordResetErrorCodes,\r\n} from '.';\r\n\r\nexport const requestResetPasswordLink = (passwordResetInfo: fos.api.PasswordResetInfo): ThunkAction => dispatch => {\r\n const promise = api.post('Anvaendare/RequestResetPassword/', passwordResetInfo, {\r\n muteErrorNotificationOnStatus: [406],\r\n anonymousCall: true,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(passwordResetLinkRequested(true));\r\n } else {\r\n dispatch(passwordResetLinkRequested(false));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const resetPassword = (resetPasswordRequest: fos.api.ResetPasswordRequest): ThunkAction => dispatch => {\r\n dispatch(executingCommand(resetPasswordRequest.Token, FetchCommandTypes.RESET_LOESENORD));\r\n const promise = api.post('Anvaendare/ResetPassword/', resetPasswordRequest, {\r\n muteErrorNotificationOnStatus: [404, 406, 410],\r\n anonymousCall: true,\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(setPasswordResetResult(true));\r\n dispatch(executedCommand(resetPasswordRequest.Token, FetchCommandTypes.RESET_LOESENORD));\r\n } else {\r\n if (result.result && result.result.http) {\r\n switch (result.result.http.status) {\r\n case 404:\r\n dispatch(setPasswordResetResult(false, PasswordResetErrorCodes.INVALID_TOKEN));\r\n break;\r\n case 410:\r\n dispatch(setPasswordResetResult(false, PasswordResetErrorCodes.INVALID_TOKEN));\r\n break;\r\n default:\r\n dispatch(setPasswordResetResult(false, PasswordResetErrorCodes.UNKNOWN));\r\n break;\r\n }\r\n } else {\r\n dispatch(setPasswordResetResult(false, PasswordResetErrorCodes.UNKNOWN));\r\n }\r\n dispatch(executingCommandFailed(resetPasswordRequest.Token, FetchCommandTypes.RESET_LOESENORD));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const clearPasswordResetState = (): ThunkAction => dispatch => dispatch(doClearPasswordResetState());\r\n","import * as React from 'react';\r\nimport {\r\n IconMyAccount,\r\n IconMenuNotifications,\r\n // IconMenuCalendar,\r\n IconMenuCalendarSync,\r\n IconMenuMembership,\r\n IconProfile,\r\n IconArrow, // ,\r\n // IconMenuSettings\r\n} from 'components/icons';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as LocationAction } from 'store/location/locationActions';\r\nimport { SettingsPages } from '.';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { isApp } from 'models/app/MobileOSType';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface SettingsLinksProps {\r\n className?: string;\r\n isDesktopMode?: boolean;\r\n activeSettingsPage?: SettingsPages;\r\n translate: TranslateFunction;\r\n shopActive?: boolean;\r\n}\r\n\r\nexport const SettingsLinks: React.SFC = props => {\r\n const renderLink = (\r\n link: LocationAction,\r\n icon: JSX.Element,\r\n heading: string,\r\n description: string,\r\n isActive: boolean = false\r\n ) => (\r\n \r\n
{icon}
\r\n
\r\n
{heading}
\r\n
{description}
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n {renderLink(\r\n LocationAction.Settings_Profile,\r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.ProfileTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.ProfileText) as string,\r\n props.activeSettingsPage === SettingsPages.Profile\r\n )}\r\n\r\n {/*\r\n renderLink(\r\n LocationAction.Settings_TrainingPreferences,\r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.TrainingPreferencesTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.TrainingPreferencesText) as string,\r\n props.activeSettingsPage === SettingsPages.TrainingPreferences\r\n )\r\n */}\r\n\r\n {renderLink(\r\n LocationAction.Settings_NotificationSettings,\r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.NotificationSettingsTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.NotificationSettingsText) as string,\r\n props.activeSettingsPage === SettingsPages.NotificationSettings\r\n )}\r\n\r\n {// disable isApp to debugg PEDRAM\r\n isApp() &&\r\n // true &&\r\n renderLink(\r\n LocationAction.Settings_CalendarSyncSettings,\r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.CalendarSyncTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.CalendarSyncText) as string,\r\n props.activeSettingsPage === SettingsPages.CalendarSync\r\n )}\r\n\r\n {props.shopActive &&\r\n renderLink(\r\n LocationAction.Settings_PaymentSettings, \r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.PaymentsTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.PaymentsText) as string,\r\n props.activeSettingsPage === SettingsPages.PaymentSettings\r\n )}\r\n\r\n {renderLink(\r\n LocationAction.Settings_UserAccount,\r\n ,\r\n props.translate(SitecoreDictionary.Profile.Menu.UserAccountTitle) as string,\r\n props.translate(SitecoreDictionary.Profile.Menu.UserAccountText) as string,\r\n props.activeSettingsPage === SettingsPages.UserAccount\r\n )}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface SettingsPageHeaderProps {\r\n title: string;\r\n description?: string;\r\n className?: string;\r\n}\r\n\r\nexport const SettingsPageHeader: React.SFC = props => {\r\n return (\r\n
\r\n
\r\n
{props.title}
\r\n
\r\n {props.description &&
{props.description}
}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { MainButton, StatusBar, AutogiroInput } from 'components/common';\r\nimport { isAccountNumberValid, isClearingNumberValid } from 'utils';\r\n\r\nimport { getPaymentSettingsError } from 'models/SitecoreDictionary';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AutogiroSettingsDataProps {\r\n translate: TranslateFunction;\r\n id: string;\r\n clearingNumber: string;\r\n accountNumber: string;\r\n isClearingNumberValid: boolean;\r\n isAccountNumberValid: boolean;\r\n updateAutogiroCmdIsExecuting: boolean;\r\n updateAutogiroCmdIsExecuted: boolean;\r\n updateAutogiroCmdExecutionFailed: boolean;\r\n errorMessage: string;\r\n}\r\n\r\nexport interface AutogiroSettingsActionProps {\r\n updateClearingNumberValue: (newValue: string) => void;\r\n updateAccountNumberValue: (newValue: string) => void;\r\n updateClearingNumberValidity: (isValid: boolean) => void;\r\n updateAccountNumberValidity: (isValid: boolean) => void;\r\n updateAutogiro: () => void;\r\n}\r\n\r\nexport interface AutogiroSettingsLocalProps {\r\n showConfirmation: boolean;\r\n}\r\n\r\ntype AutogiroSettingsProps = AutogiroSettingsDataProps & AutogiroSettingsActionProps;\r\n\r\nexport class AutogiroSettings extends React.Component {\r\n constructor(props: AutogiroSettingsProps) {\r\n super(props);\r\n this.state = {\r\n showConfirmation: false,\r\n };\r\n\r\n this.props.updateClearingNumberValidity(isClearingNumberValid(this.props.clearingNumber));\r\n this.props.updateAccountNumberValidity(isAccountNumberValid(this.props.accountNumber));\r\n this.onClearingNumberChange = this.onClearingNumberChange.bind(this);\r\n this.onAccountNumberChange = this.onAccountNumberChange.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

\r\n {this.props.translate(SitecoreDictionary.Profile.PaymentSettings.UpdateBankAccount) as string}\r\n

\r\n
this.updateBankAccount(e)}>\r\n \r\n {this.state.showConfirmation &&\r\n (this.props.updateAutogiroCmdExecutionFailed || this.props.updateAutogiroCmdIsExecuted) && (\r\n \r\n )}\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n private onClearingNumberChange(newValue: string) {\r\n this.props.updateClearingNumberValidity(isClearingNumberValid(newValue));\r\n this.props.updateClearingNumberValue(newValue as string);\r\n }\r\n\r\n private onAccountNumberChange(newValue: string) {\r\n this.props.updateAccountNumberValidity(isAccountNumberValid(newValue));\r\n this.props.updateAccountNumberValue(newValue as string);\r\n }\r\n\r\n private updateBankAccount(e: React.FormEvent) {\r\n e.preventDefault();\r\n this.setState({ showConfirmation: true });\r\n this.props.updateAutogiro();\r\n }\r\n\r\n private isFormValid() {\r\n return this.props.isClearingNumberValid && this.props.isAccountNumberValid;\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { AutogiroSettings, AutogiroSettingsDataProps, AutogiroSettingsActionProps } from './AutogiroSettings';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { updateAutogiroActions, updateAutogiro } from 'store/user/updateAutogiroCmd';\r\nimport { getIsExecutingFailed, FetchCommandTypes, getIsExecuting, getIsExecuted } from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState): AutogiroSettingsDataProps => {\r\n return {\r\n id: state.user.updateAutogiroCmd.id,\r\n clearingNumber: state.user.updateAutogiroCmd.clearingNumber,\r\n accountNumber: state.user.updateAutogiroCmd.accountNumber,\r\n isClearingNumberValid: state.user.updateAutogiroCmd.isClearingNumberValid,\r\n isAccountNumberValid: state.user.updateAutogiroCmd.isAccountNumberValid,\r\n updateAutogiroCmdIsExecuting: getIsExecuting(\r\n state.global.fetch,\r\n state.user.updateAutogiroCmd.id,\r\n FetchCommandTypes.UPDATE_AUTOGIRO\r\n ),\r\n updateAutogiroCmdIsExecuted: getIsExecuted(\r\n state.global.fetch,\r\n state.user.updateAutogiroCmd.id,\r\n FetchCommandTypes.UPDATE_AUTOGIRO\r\n ),\r\n updateAutogiroCmdExecutionFailed: getIsExecutingFailed(\r\n state.global.fetch,\r\n state.user.updateAutogiroCmd.id,\r\n FetchCommandTypes.UPDATE_AUTOGIRO\r\n ),\r\n translate: getTranslate(state.locale),\r\n errorMessage: state.user.updateAutogiroCmd.errorMessage,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): AutogiroSettingsActionProps => ({\r\n updateClearingNumberValue: (newValue: string) => dispatch(updateAutogiroActions.setClearingNumber(newValue)),\r\n updateAccountNumberValue: (newValue: string) => dispatch(updateAutogiroActions.setAccountNumber(newValue)),\r\n updateClearingNumberValidity: (isValid: boolean) =>\r\n dispatch(updateAutogiroActions.setClearingNumberValidity(isValid)),\r\n updateAccountNumberValidity: (isValid: boolean) => dispatch(updateAutogiroActions.setAccountNumberValidity(isValid)),\r\n updateAutogiro: () => dispatch(updateAutogiro()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(AutogiroSettings);\r\n","import * as React from 'react';\r\nimport { BetalningsmedelTypes } from 'store/user';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { MainButton } from '../../common';\r\nimport AutogiroSettingsContainer from './autogiroSettings';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PaymentSettingsItemDataProps {\r\n id?: string;\r\n cardNumber?: string;\r\n cardIssuerName?: string;\r\n accountNumber?: string;\r\n clearingNumber?: string;\r\n bankName?: string;\r\n type?: BetalningsmedelTypes;\r\n translate: TranslateFunction;\r\n enableEdit?: boolean;\r\n}\r\n\r\nexport interface PaymentSettingsItemActionProps {\r\n setAutogiroToUpdate?: (id: string, currentClearingNumber: string, currentAccountNumber: string) => void;\r\n}\r\n\r\ninterface PaymentSettingsItemState {\r\n showUpdateAutogiroForm: boolean;\r\n}\r\n\r\ntype PaymentSettingsItemProps = PaymentSettingsItemDataProps & PaymentSettingsItemActionProps;\r\n\r\nexport class PaymentSettingsItem extends React.Component {\r\n constructor(props: PaymentSettingsItemProps) {\r\n super(props);\r\n this.state = {\r\n showUpdateAutogiroForm: false,\r\n };\r\n\r\n this.toggleUpdateAutogiro = this.toggleUpdateAutogiro.bind(this);\r\n }\r\n\r\n toggleUpdateAutogiro() {\r\n if (this.props.enableEdit && this.props.setAutogiroToUpdate) {\r\n if (this.props.id && this.props.clearingNumber && this.props.accountNumber) {\r\n this.setState({ showUpdateAutogiroForm: !this.state.showUpdateAutogiroForm });\r\n this.props.setAutogiroToUpdate(this.props.id, this.props.clearingNumber, this.props.accountNumber);\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n if (this.props.type == null) {\r\n return null;\r\n } else if (this.props.type === BetalningsmedelTypes.Autogiro) {\r\n return (\r\n
\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.Profile.PaymentSettings.Account) as string}{' '}\r\n {this.props.clearingNumber} {this.props.accountNumber}\r\n
\r\n {this.props.enableEdit ?
{this.props.bankName}
: ''}\r\n
\r\n {this.props.enableEdit ? (\r\n this.toggleUpdateAutogiro()}\r\n />\r\n ) : (\r\n ''\r\n )}\r\n\r\n {this.state.showUpdateAutogiroForm && }\r\n
\r\n );\r\n } else if (this.props.type === BetalningsmedelTypes.Avtalegiro) {\r\n return (\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.Profile.PaymentSettings.Account) as string}{' '}\r\n {this.props.accountNumber}\r\n
\r\n
\r\n );\r\n } else if (this.props.type === BetalningsmedelTypes.Card) {\r\n return (\r\n
\r\n
{this.props.cardNumber}
\r\n
{this.props.cardIssuerName}
\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PaymentSettingsItem } from './PaymentSettingsItem';\r\nimport { EntityStatus } from '../../../store/global/fetch';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AutogirosDataProps {\r\n data: fos.api.Autogiro[] | null;\r\n fetchState?: EntityStatus;\r\n translate: TranslateFunction;\r\n enableEdit: boolean;\r\n}\r\n\r\nexport interface AutogirosActionProps {\r\n setAutogiroToUpdate: (id: string, currentClearingNumber: string, currentAccountNumber: string) => void;\r\n}\r\n\r\ntype AutogirosProps = AutogirosActionProps & AutogirosDataProps;\r\n\r\nexport const Autogiros = (props: AutogirosProps) => {\r\n const getAutogiro = () => {\r\n if (props.fetchState === EntityStatus.FETCHING || props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND) {\r\n return ;\r\n } else if (props.data) {\r\n return props.data.map(b => (\r\n \r\n ));\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {(props.fetchState === EntityStatus.FETCHING ||\r\n props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND ||\r\n (props.data && props.data.length > 0)) && (\r\n
\r\n {props.translate(SitecoreDictionary.Profile.PaymentSettings.Autogiro) as string}\r\n
\r\n )}\r\n {getAutogiro()}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { PaymentSettingsItem } from './PaymentSettingsItem';\r\nimport { EntityStatus } from '../../../store/global/fetch';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AvtalegirosDataProps {\r\n data: fos.api.Avtalegiro[] | null;\r\n fetchState?: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface AvtalegirosActionProps {}\r\n\r\ntype AvtalegirosProps = AvtalegirosActionProps & AvtalegirosDataProps;\r\n\r\nexport const Avtalegiros = (props: AvtalegirosProps) => {\r\n const getAvtalegiro = () => {\r\n if (props.fetchState === EntityStatus.FETCHING || props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND) {\r\n return ;\r\n } else if (props.data) {\r\n return props.data.map(b => (\r\n \r\n ));\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {(props.fetchState === EntityStatus.FETCHING ||\r\n props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND ||\r\n (props.data && props.data.length > 0)) && (\r\n
\r\n {props.translate(SitecoreDictionary.Profile.PaymentSettings.Avtalegiro) as string}\r\n
\r\n )}\r\n {getAvtalegiro()}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { PaymentSettingsItem } from './PaymentSettingsItem';\r\nimport { EntityStatus } from '../../../store/global/fetch';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface CardsDataProps {\r\n data: fos.api.Betalkort[] | null;\r\n fetchState?: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface CardsActionProps {}\r\n\r\ntype CardsProps = CardsActionProps & CardsDataProps;\r\n\r\nexport const Cards = (props: CardsProps) => {\r\n const getCard = () => {\r\n if (props.fetchState === EntityStatus.FETCHING || props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND) {\r\n return ;\r\n } else if (props.data) {\r\n return props.data.map(b => (\r\n \r\n ));\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {(props.fetchState === EntityStatus.FETCHING ||\r\n props.fetchState === EntityStatus.FETCHING_IN_BACKGROUND ||\r\n (props.data && props.data.length > 0)) && (\r\n
\r\n {props.translate(SitecoreDictionary.Profile.PaymentSettings.Card) as string}\r\n
\r\n )}\r\n {getCard()}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { Autogiros } from './Autogiros';\r\nimport { Avtalegiros } from './Avtalegiros';\r\nimport { Cards } from './Cards';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PaymentSettingsDataProps {\r\n betalningsmedel?: fos.api.Betalningsmedel;\r\n fetchState?: EntityStatus;\r\n inloggadFoereningId: number | undefined;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface PaymentSettingsActionProps {\r\n getRegistreradeBetalningsmedel: (foreningId: number) => void;\r\n setAutogiroToUpdate: (id: string, currentClearingNumber: string, currentAccountNumber: string) => void;\r\n}\r\n\r\ntype PaymentSettingsProps = PaymentSettingsDataProps & PaymentSettingsActionProps;\r\n\r\nexport class PaymentSettings extends React.Component {\r\n componentDidMount() {\r\n if (!!this.props.inloggadFoereningId) {\r\n this.props.getRegistreradeBetalningsmedel(this.props.inloggadFoereningId);\r\n }\r\n }\r\n\r\n render() {\r\n const hasRegisteredPayments = this.hasPayments();\r\n return (\r\n
\r\n
\r\n {\r\n this.props.translate(\r\n hasRegisteredPayments\r\n ? SitecoreDictionary.Profile.PaymentSettings.Information\r\n : SitecoreDictionary.Profile.PaymentSettings.NoRegisteredPayments\r\n ) as string\r\n }\r\n
\r\n {this.autogiro}\r\n {this.avtalegiro}\r\n {this.cards}\r\n {hasRegisteredPayments && (\r\n
{this.terminateInformation}
\r\n )}\r\n
\r\n );\r\n }\r\n\r\n private get cards() {\r\n return (\r\n \r\n );\r\n }\r\n\r\n private get autogiro() {\r\n return (\r\n \r\n );\r\n }\r\n\r\n private get avtalegiro() {\r\n return (\r\n \r\n );\r\n }\r\n\r\n private get terminateInformation() {\r\n if (this.props && this.props.betalningsmedel && this.props.betalningsmedel.IsEditEnabled) {\r\n return this.props.translate(SitecoreDictionary.Profile.PaymentSettings.TerminateInformationWhenEnabled) as string;\r\n }\r\n return this.props.translate(SitecoreDictionary.Profile.PaymentSettings.TerminateInformation) as string;\r\n }\r\n\r\n private hasPayments(): boolean {\r\n return (\r\n !!this.props.betalningsmedel &&\r\n ((!!this.props.betalningsmedel.AutogiroLista && this.props.betalningsmedel.AutogiroLista.length > 0) ||\r\n (!!this.props.betalningsmedel.AvtalegiroLista && this.props.betalningsmedel.AvtalegiroLista.length > 0) ||\r\n (!!this.props.betalningsmedel.BankkortLista && this.props.betalningsmedel.BankkortLista.length > 0))\r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { PaymentSettings, PaymentSettingsDataProps, PaymentSettingsActionProps } from './PaymentSettings';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getRegistreradeBetalningsmedel } from 'store/user';\r\nimport { updateAutogiroActions } from 'store/user/updateAutogiroCmd';\r\n\r\nconst mapStateToProps = (state: RootState): PaymentSettingsDataProps => {\r\n return {\r\n betalningsmedel: state.user.read.betalningsmedel,\r\n inloggadFoereningId: state.global.session.activeFoerening,\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): PaymentSettingsActionProps => ({\r\n getRegistreradeBetalningsmedel: (foereningId: number) => dispatch(getRegistreradeBetalningsmedel(foereningId)),\r\n setAutogiroToUpdate: (id: string, currentClearingNumber: string, currentAccountNumber: string) =>\r\n dispatch(updateAutogiroActions.setAutogiroToUpdate(id, currentClearingNumber, currentAccountNumber)),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(PaymentSettings);\r\n","import * as React from 'react';\r\nimport { StatusBar, NewPassword, MainInput, MainButton } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { LocationState } from 'store/location';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nexport interface UserAccountDataProps {\r\n translate: TranslateFunction;\r\n newPasswordValue: string;\r\n repeatNewPasswordValue: string;\r\n currentPasswordValue: string;\r\n isNewPasswordValid: boolean;\r\n isRepeatNewPasswordValid: boolean;\r\n isCurrentPasswordValid: boolean;\r\n isFormValid: boolean;\r\n changePasswordCmdIsExecuted: boolean;\r\n changePasswordCmdExecutionFailed: boolean;\r\n changePasswordCmdIsExecuting: boolean;\r\n activeFoereningId: number;\r\n anlaeggningar: Array;\r\n savedAnlaeggningar: Array;\r\n location: LocationState;\r\n}\r\n\r\nexport interface UserAccountActionProps {\r\n updateCurrentPasswordValue: (newValue: string) => void;\r\n updateNewPasswordValue: (newValue: string) => void;\r\n updateRepeatNewPasswordValue: (newValue: string) => void;\r\n updateRepeatNewPasswordValidity: (isValid: boolean) => void;\r\n updateNewPasswordValidity: (isValid: boolean) => void;\r\n updateCurrentPasswordValidity: (isValid: boolean) => void;\r\n updateFormValidity: (isValid: boolean) => void;\r\n changePassword: () => void;\r\n clearChangeFetchPasswordCmd: (activeFoereningId: number) => void;\r\n clearChangePasswordCmd: () => void;\r\n}\r\n\r\ntype UserAccountProps = UserAccountDataProps & UserAccountActionProps;\r\n\r\nexport class UserAccount extends React.Component {\r\n constructor(props: UserAccountProps) {\r\n super(props);\r\n this.onCurrentPasswordChange = this.onCurrentPasswordChange.bind(this);\r\n this.onNewPasswordValidityChange = this.onNewPasswordValidityChange.bind(this);\r\n this.onRepeatNewPasswordValidityChange = this.onRepeatNewPasswordValidityChange.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n this.props.clearChangeFetchPasswordCmd(this.props.activeFoereningId);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.clearChangePasswordCmd();\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

\r\n {this.props.translate(SitecoreDictionary.UserAccount.ChangePasswordTitle)}\r\n

\r\n
this.changePassword(e)}>\r\n this.onCurrentPasswordChange(value as string)}\r\n disabled={this.props.changePasswordCmdIsExecuting}\r\n />\r\n \r\n {(this.props.changePasswordCmdExecutionFailed || this.props.changePasswordCmdIsExecuted) && (\r\n \r\n )}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private changePassword(e: React.FormEvent) {\r\n e.preventDefault();\r\n this.props.changePassword();\r\n }\r\n\r\n private onCurrentPasswordChange(newValue: string) {\r\n this.props.updateCurrentPasswordValue(newValue);\r\n const isCurrentPasswordValid = !!newValue && newValue !== '';\r\n this.props.updateCurrentPasswordValidity(isCurrentPasswordValid);\r\n this.updateFormValidity(isCurrentPasswordValid, this.props.isNewPasswordValid, this.props.isRepeatNewPasswordValid);\r\n }\r\n\r\n private onNewPasswordValidityChange(isValid: boolean) {\r\n this.props.updateNewPasswordValidity(isValid);\r\n this.updateFormValidity(this.props.isCurrentPasswordValid, isValid, this.props.isRepeatNewPasswordValid);\r\n }\r\n\r\n private onRepeatNewPasswordValidityChange(isValid: boolean) {\r\n this.props.updateRepeatNewPasswordValidity(isValid);\r\n this.updateFormValidity(this.props.isCurrentPasswordValid, this.props.isNewPasswordValid, isValid);\r\n }\r\n\r\n private updateFormValidity(\r\n isCurrentPasswordValid: boolean,\r\n isNewPasswordValid: boolean,\r\n isRepeatNewPasswordValid: boolean\r\n ) {\r\n if (this.props.changePasswordCmdIsExecuted || this.props.changePasswordCmdExecutionFailed) {\r\n this.props.clearChangeFetchPasswordCmd(this.props.activeFoereningId);\r\n }\r\n this.props.updateFormValidity(isCurrentPasswordValid && isNewPasswordValid && isRepeatNewPasswordValid);\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { UserAccount, UserAccountDataProps, UserAccountActionProps } from './userAccount';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { changePasswordActions, changePassword } from 'store/user/changePasswordCmd';\r\nimport {\r\n getIsExecutingFailed,\r\n FetchCommandTypes,\r\n getIsExecuting,\r\n getIsExecuted,\r\n initialCommand,\r\n} from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState): UserAccountDataProps => ({\r\n location: state.location,\r\n activeFoereningId: state.global.session.activeFoerening as number,\r\n anlaeggningar: state.anlaeggningar.read.sitecoreAnlaeggningar,\r\n savedAnlaeggningar: state.trainingPreferences.read.anlaeggningar,\r\n currentPasswordValue: state.user.changePasswordCmd.currentPassword,\r\n isNewPasswordValid: state.user.changePasswordCmd.isNewPasswordValid,\r\n isRepeatNewPasswordValid: state.user.changePasswordCmd.isRepeatNewPasswordValid,\r\n newPasswordValue: state.user.changePasswordCmd.newPassword,\r\n repeatNewPasswordValue: state.user.changePasswordCmd.repeatNewPassword,\r\n isCurrentPasswordValid: state.user.changePasswordCmd.isCurrentPasswordValid,\r\n isFormValid: state.user.changePasswordCmd.isFormValid,\r\n translate: getTranslate(state.locale),\r\n changePasswordCmdExecutionFailed:\r\n !!state.global.session.activeFoerening &&\r\n getIsExecutingFailed(\r\n state.global.fetch,\r\n state.global.session.activeFoerening.toString(),\r\n FetchCommandTypes.AENDRA_LOESENORD\r\n ),\r\n changePasswordCmdIsExecuted:\r\n !!state.global.session.activeFoerening &&\r\n getIsExecuted(\r\n state.global.fetch,\r\n state.global.session.activeFoerening.toString(),\r\n FetchCommandTypes.AENDRA_LOESENORD\r\n ),\r\n changePasswordCmdIsExecuting:\r\n !!state.global.session.activeFoerening &&\r\n getIsExecuting(\r\n state.global.fetch,\r\n state.global.session.activeFoerening.toString(),\r\n FetchCommandTypes.AENDRA_LOESENORD\r\n ),\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): UserAccountActionProps => ({\r\n updateCurrentPasswordValidity: (isValid: boolean) =>\r\n dispatch(changePasswordActions.setCurrentPasswordValidity(isValid)),\r\n updateCurrentPasswordValue: (newValue: string) => dispatch(changePasswordActions.setCurrentPassword(newValue)),\r\n updateFormValidity: (isValid: boolean) => dispatch(changePasswordActions.setFormValidity(isValid)),\r\n updateNewPasswordValidity: (isValid: boolean) => dispatch(changePasswordActions.setNewPasswordValidity(isValid)),\r\n updateNewPasswordValue: (newValue: string) => dispatch(changePasswordActions.setNewPassword(newValue)),\r\n updateRepeatNewPasswordValidity: (isValid: boolean) =>\r\n dispatch(changePasswordActions.setRepeatNewPasswordValidity(isValid)),\r\n updateRepeatNewPasswordValue: (newValue: string) => dispatch(changePasswordActions.setRepeatNewPassword(newValue)),\r\n changePassword: () => dispatch(changePassword()),\r\n clearChangeFetchPasswordCmd: aktiveFoereningId =>\r\n dispatch(initialCommand(aktiveFoereningId.toString(), FetchCommandTypes.AENDRA_LOESENORD)),\r\n clearChangePasswordCmd: () => dispatch(changePasswordActions.clearCmd()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(UserAccount);\r\n","import { executedCommand, executingCommandFailed } from './../../global/fetch/fetchActions';\r\nimport { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { changePasswordActions } from '.';\r\nimport { executingCommand, FetchCommandTypes } from 'store/global/fetch';\r\n\r\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (!state.global.session.activeFoerening) {\r\n return;\r\n }\r\n\r\n const activeFoereningId: number = state.global.session.activeFoerening;\r\n const requestBody: fos.api.ChangePasswordRequest = {\r\n FoereningId: activeFoereningId,\r\n OldPassword: state.user.changePasswordCmd.currentPassword,\r\n NewPassword: state.user.changePasswordCmd.newPassword,\r\n ConfirmPassword: state.user.changePasswordCmd.repeatNewPassword,\r\n };\r\n dispatch(executingCommand(activeFoereningId.toString(), FetchCommandTypes.AENDRA_LOESENORD));\r\n return api\r\n .put<{}, fos.api.ChangePasswordRequest>('Anvaendare/ChangePassword', requestBody, {\r\n muteErrorNotificationOnStatus: [406],\r\n })\r\n .then(res => {\r\n if (res.error) {\r\n dispatch(executingCommandFailed(activeFoereningId.toString(), FetchCommandTypes.AENDRA_LOESENORD));\r\n } else {\r\n dispatch(executedCommand(activeFoereningId.toString(), FetchCommandTypes.AENDRA_LOESENORD));\r\n dispatch(changePasswordActions.clearCmd());\r\n }\r\n });\r\n};\r\n","import { NotificationOptions } from 'models';\r\nimport { fetched, fetching, FetchStatusAggregateTypes, fetchedFailed } from 'store/global/fetch';\r\nimport { getPushNotificationSettings } from './pushNotificationSettingsActions';\r\nimport { api } from 'api';\r\nimport { ThunkAction } from 'store';\r\n\r\nexport const fetchPushNotificationSettings = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const userId = state.global.session.userId;\r\n if (!userId) {\r\n return;\r\n }\r\n dispatch(fetching(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS));\r\n const promise = api.get(`Notis/Getinstaellningar`);\r\n promise.then(result => {\r\n if (!result.error) {\r\n dispatch(getPushNotificationSettings(result.result));\r\n dispatch(fetched(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS, result.result));\r\n } else {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS));\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const updatePushNotificationSettings = (setting: string): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const settings = state.pushNotificationSettings;\r\n const userId = state.global.session.userId;\r\n\r\n if (!userId || !settings.UserNotificatonSettingsId) {\r\n return;\r\n }\r\n\r\n const payload: fos.api.PushNotificationSettings = {\r\n UserNotificatonSettingsId: settings.UserNotificatonSettingsId,\r\n };\r\n\r\n switch (setting) {\r\n case NotificationOptions.PassCancelled:\r\n payload.PassCancelled = !settings.PassCancelled;\r\n break;\r\n case NotificationOptions.Vaentelista:\r\n payload.Vaentelista = !settings.Vaentelista;\r\n break;\r\n case NotificationOptions.News:\r\n payload.News = !settings.News;\r\n break;\r\n case NotificationOptions.TraeningskortAboutToExpire:\r\n payload.TraeningskortAboutToExpire = !settings.TraeningskortAboutToExpire;\r\n break;\r\n default:\r\n break;\r\n }\r\n // Uppdatera lokalt direkt, och rätta i efterhand om ändringen misslyckades\r\n dispatch(getPushNotificationSettings(payload));\r\n dispatch(fetching(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS));\r\n const promise = api.post(\r\n 'Notis/UpdateInstaellningar',\r\n payload\r\n );\r\n promise.then(result => {\r\n if (!result.error) {\r\n if (didUpdateFail(setting, settings, result.result)) {\r\n dispatch(getPushNotificationSettings(result.result));\r\n }\r\n dispatch(fetched(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS, result.result));\r\n } else {\r\n dispatch(fetchedFailed(userId, FetchStatusAggregateTypes.NOTIFICATIONS_SETTINGS));\r\n }\r\n });\r\n};\r\n\r\nconst didUpdateFail = (\r\n setting: string,\r\n originalValue: fos.api.PushNotificationSettings,\r\n result: fos.api.PushNotificationSettings\r\n): boolean => {\r\n switch (setting) {\r\n case NotificationOptions.PassCancelled:\r\n return originalValue.PassCancelled === result.PassCancelled;\r\n case NotificationOptions.Vaentelista:\r\n return originalValue.Vaentelista === result.Vaentelista;\r\n case NotificationOptions.News:\r\n return originalValue.News === result.News;\r\n case NotificationOptions.TraeningskortAboutToExpire:\r\n return originalValue.TraeningskortAboutToExpire === result.TraeningskortAboutToExpire;\r\n default:\r\n return false;\r\n }\r\n};\r\n","import * as React from 'react';\r\n\r\n// https://upmostly.com/tutorials/build-a-react-switch-toggle-component\r\ninterface SwitchProps {\r\n isOn: boolean;\r\n handleToggle: () => void;\r\n onColor: string;\r\n switchId: string;\r\n}\r\n\r\nconst Switch = ({ isOn, handleToggle, switchId, onColor }: SwitchProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Switch;\r\n","import * as React from 'react';\r\nimport { Spinner } from '../../common';\r\nimport Switch from 'components/Switch/Switch';\r\n\r\nexport interface ListItemDataProps {\r\n readonly header: string;\r\n readonly subheader: string;\r\n readonly activated: boolean;\r\n readonly showSpinner: boolean;\r\n}\r\n\r\nexport interface ListItemActionProps {\r\n onClick: () => void;\r\n}\r\n\r\ntype ListItemProps = ListItemDataProps & ListItemActionProps;\r\n\r\nexport const ListItem: React.SFC = props => (\r\n
\r\n
\r\n

{props.header}

\r\n

{props.subheader}

\r\n
\r\n\r\n
\r\n {props.showSpinner ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\nimport { ListItem } from './ListItem';\r\n\r\nimport { SitecoreDictionary, NotificationOptions } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface NotificationSettingsDataProps {\r\n PassCancelled?: boolean;\r\n Vaentelista?: boolean;\r\n News?: boolean;\r\n TraeningskortAboutToExpire?: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface NotificationSettingsActionProps {\r\n fetchPushNotificationSettings: () => void;\r\n updatePushNotificationSettings: (setting: string) => void;\r\n}\r\n\r\nexport type NotificationSettingsProps = NotificationSettingsActionProps & NotificationSettingsDataProps;\r\n\r\nexport class NotificationSettings extends React.Component {\r\n componentDidMount() {\r\n this.props.fetchPushNotificationSettings();\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n this.props.updatePushNotificationSettings(NotificationOptions.PassCancelled)}\r\n showSpinner={this.props.PassCancelled === undefined}\r\n />\r\n this.props.updatePushNotificationSettings(NotificationOptions.Vaentelista)}\r\n showSpinner={this.props.Vaentelista === undefined}\r\n />\r\n this.props.updatePushNotificationSettings(NotificationOptions.News)}\r\n showSpinner={this.props.News === undefined}\r\n />\r\n {/* this.props.updatePushNotificationSettings(NotificationOptions.TraeningskortAboutToExpire)}\r\n showSpinner={this.props.TraeningskortAboutToExpire === undefined}\r\n /> */}\r\n
\r\n );\r\n }\r\n}\r\n","import { RootState, Dispatch } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport {\r\n fetchPushNotificationSettings,\r\n updatePushNotificationSettings,\r\n} from 'store/pushNotificationSettings/pushNotificationSettingsThunks';\r\nimport {\r\n NotificationSettingsDataProps,\r\n NotificationSettingsActionProps,\r\n NotificationSettings,\r\n} from './NotificationSettings';\r\n\r\nconst mapState = (state: RootState): NotificationSettingsDataProps => ({\r\n PassCancelled: state.pushNotificationSettings.PassCancelled,\r\n Vaentelista: state.pushNotificationSettings.Vaentelista,\r\n News: state.pushNotificationSettings.News,\r\n TraeningskortAboutToExpire: state.pushNotificationSettings.TraeningskortAboutToExpire,\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nconst mapDispatch = (dispatch: Dispatch): NotificationSettingsActionProps => ({\r\n fetchPushNotificationSettings: () => dispatch(fetchPushNotificationSettings()),\r\n updatePushNotificationSettings: (setting: string) => dispatch(updatePushNotificationSettings(setting)),\r\n});\r\n\r\nexport default connect(mapState, mapDispatch)(NotificationSettings);\r\n","import * as React from 'react';\r\nimport { IconHeart } from 'components/icons';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface PreferenceItemProps {\r\n title: string;\r\n disabled: boolean;\r\n active?: boolean;\r\n removeItem: (preference: string) => void;\r\n addItem: (preference: string) => void;\r\n translate?: TranslateFunction;\r\n selectedCallback?: () => void;\r\n}\r\n\r\ninterface PreferenceItemState {\r\n selected: boolean;\r\n}\r\n\r\nexport class PreferenceItem extends React.Component {\r\n cssClass = this.props.disabled ? 'Disabled' : '';\r\n\r\n constructor(props: PreferenceItemProps) {\r\n super(props);\r\n this.state = {\r\n selected: props.active ? props.active : false,\r\n };\r\n\r\n if (props.active) {\r\n this.props.addItem(this.props.title);\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n null : () => this.toggleSelected(this.state.selected)}\r\n >\r\n
\r\n \r\n
\r\n
\r\n {this.props.translate\r\n ? this.props.translate(SitecoreDictionary.TrainingPreferences.Preferences + this.props.title)\r\n : this.props.title}\r\n
\r\n
\r\n );\r\n }\r\n\r\n private toggleSelected(selected: boolean) {\r\n if (selected === true) {\r\n this.props.removeItem(this.props.title);\r\n } else {\r\n this.props.addItem(this.props.title);\r\n }\r\n this.setState({ selected: !this.state.selected });\r\n if (this.props.selectedCallback) {\r\n this.props.selectedCallback();\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Overlay } from 'components/common';\r\nimport { PreferenceItem } from './PreferenceItem';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface IntressenProps {\r\n preferences: Array;\r\n savedFavoriteAnlaeggningar: Array;\r\n close: () => void;\r\n removeFavoriteAnlaeggning: (preference: string) => void;\r\n addFavoriteAnlaeggning: (preference: string) => void;\r\n saveFavoriteAnlaeggningar: () => void;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport class AnlaeggningarList extends React.Component {\r\n constructor(props: IntressenProps) {\r\n super(props);\r\n this.state = {};\r\n this.onSave = this.onSave.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.TrainingPreferences.Add)}{' '}\r\n {this.props.translate(SitecoreDictionary.TrainingPreferences.Facilities)}\r\n
\r\n
\r\n\r\n {this.props.preferences.map((p, index) => (\r\n \r\n ))}\r\n
\r\n
\r\n );\r\n }\r\n\r\n private isAlreadySaved(name: string) {\r\n const el = this.props.savedFavoriteAnlaeggningar.find(i => i === name);\r\n return el ? true : false;\r\n }\r\n\r\n private onSave() {\r\n this.props.saveFavoriteAnlaeggningar();\r\n this.props.close();\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconChevron } from 'components/icons';\r\nimport { PreferenceItem } from './PreferenceItem';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\n\r\ninterface ItemDropdownListProps {\r\n title: string;\r\n items: Array;\r\n savedItems: Array;\r\n removeItem: (preference: string) => void;\r\n addItem: (preference: string) => void;\r\n translate: TranslateFunction;\r\n selectedCallback: () => void;\r\n}\r\n\r\ninterface ItemDropdownListState {\r\n isListExpanded: boolean;\r\n}\r\n\r\nexport class ItemDropdownList extends React.Component {\r\n constructor(props: ItemDropdownListProps) {\r\n super(props);\r\n this.state = {\r\n isListExpanded: false,\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
this.toggleList()}>\r\n {this.props.title}\r\n \r\n
\r\n\r\n {this.state.isListExpanded && (\r\n
\r\n {this.props.items.map((i, index) => (\r\n \r\n ))}\r\n
\r\n )}\r\n
\r\n );\r\n }\r\n\r\n private isAlreadySaved(name: string) {\r\n const el = this.props.savedItems.find(i => i === name);\r\n return el ? true : false;\r\n }\r\n\r\n private toggleList() {\r\n this.setState({ isListExpanded: !this.state.isListExpanded });\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Overlay } from 'components/common';\r\nimport { ItemDropdownList } from './ItemDropdownList';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface PreferenceListProps {\r\n childrenAgeGroups: Array;\r\n workoutLevels: Array;\r\n savedItems: Array;\r\n close: () => void;\r\n removeWorkoutLevel: (preference: string) => void;\r\n addWorkoutLevel: (preference: string) => void;\r\n addChildAgeGroup: (preference: string) => void;\r\n removeChildAgeGroup: (preference: string) => void;\r\n saveSpecialIntressen: () => void;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport class PreferenceList extends React.Component {\r\n constructor(props: PreferenceListProps) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n {this.props.translate(SitecoreDictionary.TrainingPreferences.Add)}{' '}\r\n {this.props.translate(SitecoreDictionary.TrainingPreferences.SpecialInterests)}\r\n
\r\n
\r\n\r\n \r\n\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconCross } from 'components/icons';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface AnvaendarePreferenceListProps {\r\n items: Array;\r\n removeItem: (specialintresse: fos.api.SavedSpecialintresse) => void;\r\n shouldTranslate: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport class AnvaendarePreferenceList extends React.Component {\r\n render() {\r\n return (\r\n
\r\n {this.props.items.map((i, index) => (\r\n
\r\n
\r\n {this.props.shouldTranslate\r\n ? (this.props.translate(\r\n SitecoreDictionary.TrainingPreferences.Preferences + i.SpecialintresseName\r\n ) as string)\r\n : i.SpecialintresseName}\r\n
\r\n
this.props.removeItem(i)}>\r\n \r\n
\r\n
\r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconPlus } from '../../icons/index';\r\nimport { AnlaeggningarList } from './AnlaeggningarList';\r\nimport { PreferenceList } from './PreferenceList';\r\nimport { AnvaendarePreferenceList } from './AnvaendarePreferenceList';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface TrainingPreferencesDataProps {\r\n user: fos.api.User;\r\n activeFoerning?: fos.api.InloggadeFoerening;\r\n anlaeggningar: Array;\r\n workoutLevels: Array;\r\n childrenAgeGroups: Array;\r\n savedSpecialintressen: Array;\r\n savedAnlaeggningar: Array;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface TrainingPreferencesActionProps {\r\n removeChildAgeGroup: (name: string) => void;\r\n addChildAgeGroup: (name: string) => void;\r\n removeWorkoutLevel: (preference: string) => void;\r\n addWorkoutLevel: (preference: string) => void;\r\n getSitecoreAnlaeggningar: (foereningName: string, foereningId: number, countryId: number) => void;\r\n getSpecialIntressen: () => void;\r\n saveSpecialIntressen: () => void;\r\n removeSpecialintressen: () => void;\r\n getSavedSpecialIntressen: () => void;\r\n removeSavedSpecialintresse: (Specialintresse: fos.api.SavedSpecialintresse) => void;\r\n removeFavoriteAnlaeggningar: () => void;\r\n removeFavoriteAnlaeggning: (anlaeggning: string) => void;\r\n addFavoriteAnlaeggning: (anlaeggning: string) => void;\r\n saveFavoriteAnlaeggningar: () => void;\r\n getSavedAnlaeggningar: () => void;\r\n removeSavedFavoriteAnlaeggning: (Specialintresse: fos.api.SavedSpecialintresse) => void;\r\n}\r\n\r\ninterface TrainingPreferencesState {\r\n isAnlaeggningarOverlayOpen: boolean;\r\n isSpecialIntresenOverlayOpen: boolean;\r\n}\r\n\r\ntype TrainingPreferencesProps = TrainingPreferencesDataProps & TrainingPreferencesActionProps;\r\n\r\nexport class TrainingPreferences extends React.Component {\r\n constructor(props: TrainingPreferencesProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isAnlaeggningarOverlayOpen: false,\r\n isSpecialIntresenOverlayOpen: false,\r\n };\r\n\r\n this.toggleIsAnlaeggnignarOverlayOpen = this.toggleIsAnlaeggnignarOverlayOpen.bind(this);\r\n this.toggleIsSpecialIntressenOverlayOpen = this.toggleIsSpecialIntressenOverlayOpen.bind(this);\r\n this.closeSpecialIntressenOverlayOpen = this.closeSpecialIntressenOverlayOpen.bind(this);\r\n }\r\n\r\n UNSAFE_componentWillMount() {\r\n this.props.getSpecialIntressen();\r\n this.props.getSavedSpecialIntressen();\r\n this.props.getSavedAnlaeggningar();\r\n if (this.props.activeFoerning) {\r\n this.props.getSitecoreAnlaeggningar(\r\n this.props.activeFoerning.Namn,\r\n this.props.activeFoerning.Id,\r\n this.props.activeFoerning.CountryId\r\n );\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.state.isAnlaeggningarOverlayOpen && (\r\n i.Name)}\r\n savedFavoriteAnlaeggningar={this.props.savedAnlaeggningar.map(i => i.SpecialintresseName)}\r\n removeFavoriteAnlaeggning={this.props.removeFavoriteAnlaeggning}\r\n addFavoriteAnlaeggning={this.props.addFavoriteAnlaeggning}\r\n saveFavoriteAnlaeggningar={this.props.saveFavoriteAnlaeggningar}\r\n />\r\n )}\r\n {this.state.isSpecialIntresenOverlayOpen && (\r\n i.SpecialintresseName)}\r\n />\r\n )}\r\n\r\n
\r\n
\r\n
{this.props.translate(SitecoreDictionary.TrainingPreferences.Facilities)}
\r\n
{this.props.translate(SitecoreDictionary.TrainingPreferences.FacilitiesText)}
\r\n
\r\n
\r\n \r\n\r\n
this.toggleIsAnlaeggnignarOverlayOpen()}>\r\n
{this.props.translate(SitecoreDictionary.TrainingPreferences.Add)}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{this.props.translate(SitecoreDictionary.TrainingPreferences.SpecialInterests)}
\r\n
\r\n {this.props.translate(SitecoreDictionary.TrainingPreferences.SpecialInterestsText)}\r\n
\r\n
\r\n
\r\n \r\n\r\n
this.toggleIsSpecialIntressenOverlayOpen()}>\r\n
{this.props.translate(SitecoreDictionary.TrainingPreferences.Add)}
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private toggleIsAnlaeggnignarOverlayOpen() {\r\n this.props.removeFavoriteAnlaeggningar();\r\n this.setState({ isAnlaeggningarOverlayOpen: !this.state.isAnlaeggningarOverlayOpen });\r\n }\r\n\r\n private closeSpecialIntressenOverlayOpen() {\r\n this.props.removeSpecialintressen();\r\n this.setState({ isSpecialIntresenOverlayOpen: !this.state.isSpecialIntresenOverlayOpen });\r\n }\r\n\r\n private toggleIsSpecialIntressenOverlayOpen() {\r\n this.setState({ isSpecialIntresenOverlayOpen: !this.state.isSpecialIntresenOverlayOpen });\r\n }\r\n}\r\n","import {\r\n removeFavoriteAnlaeggningar,\r\n addFavoriteAnlaeggning,\r\n removeFavoriteAnlaeggning,\r\n} from 'store/trainingpreferences/write/trainingPreferencesWriteActions';\r\nimport {\r\n deleteSavedSpecialintresse,\r\n saveFavoriteAnlaeggningar,\r\n getSavedAnlaeggningar,\r\n deleteSavedAnlaeggning,\r\n} from 'store/trainingpreferences/thunks';\r\nimport {\r\n removeChildAgeGroup,\r\n addChildAgeGroup,\r\n removeWorkoutLevel,\r\n addWorkoutLevel,\r\n removeSpecialintressen,\r\n} from 'store/trainingpreferences/write/trainingPreferencesWriteActions';\r\nimport { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n TrainingPreferences,\r\n TrainingPreferencesDataProps,\r\n TrainingPreferencesActionProps,\r\n} from './TrainingPreferences';\r\nimport { getSitecoreAnlaeggningar } from 'store/anlaeggningar';\r\nimport { getActiveFoerening } from 'utils';\r\nimport { getSpecialIntressen, saveSpecialIntressen, getSavedSpecialIntressen } from 'store/trainingpreferences';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapStateToProps = (state: RootState): TrainingPreferencesDataProps => {\r\n return {\r\n user: state.user.read.user,\r\n savedSpecialintressen: state.trainingPreferences.read.savedSpecialintressen,\r\n savedAnlaeggningar: state.trainingPreferences.read.anlaeggningar,\r\n anlaeggningar: state.anlaeggningar.read.sitecoreAnlaeggningar,\r\n activeFoerning: getActiveFoerening(state.global.session.inloggadeFoereningar, state.global.session.activeFoerening),\r\n workoutLevels: state.trainingPreferences.read.workoutlevels,\r\n childrenAgeGroups: state.trainingPreferences.read.childrenAgeGroups,\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): TrainingPreferencesActionProps => ({\r\n getSitecoreAnlaeggningar: (foereningNamn: string, foereningId: number, countryId: number) =>\r\n dispatch(getSitecoreAnlaeggningar(foereningNamn, foereningId, countryId)),\r\n getSpecialIntressen: () => dispatch(getSpecialIntressen()),\r\n removeWorkoutLevel: (name: string) => dispatch(removeWorkoutLevel(name)),\r\n addWorkoutLevel: (name: string) => dispatch(addWorkoutLevel(name)),\r\n removeChildAgeGroup: (name: string) => dispatch(removeChildAgeGroup(name)),\r\n addChildAgeGroup: (name: string) => dispatch(addChildAgeGroup(name)),\r\n saveSpecialIntressen: () => dispatch(saveSpecialIntressen()),\r\n removeSpecialintressen: () => dispatch(removeSpecialintressen()),\r\n getSavedSpecialIntressen: () => dispatch(getSavedSpecialIntressen()),\r\n removeSavedSpecialintresse: (specialIntresse: fos.api.SavedSpecialintresse) =>\r\n dispatch(deleteSavedSpecialintresse(specialIntresse)),\r\n removeFavoriteAnlaeggningar: () => dispatch(removeFavoriteAnlaeggningar()),\r\n removeFavoriteAnlaeggning: (anlaeggning: string) => dispatch(removeFavoriteAnlaeggning(anlaeggning)),\r\n removeSavedFavoriteAnlaeggning: (specialIntresse: fos.api.SavedSpecialintresse) =>\r\n dispatch(deleteSavedAnlaeggning(specialIntresse)),\r\n addFavoriteAnlaeggning: (anlaeggning: string) => dispatch(addFavoriteAnlaeggning(anlaeggning)),\r\n saveFavoriteAnlaeggningar: () => dispatch(saveFavoriteAnlaeggningar()),\r\n getSavedAnlaeggningar: () => dispatch(getSavedAnlaeggningar()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(TrainingPreferences);\r\n","import { RootState, Dispatch } from '../../../store';\r\nimport { connect } from 'react-redux';\r\nimport { setCalendarSync, setSelectedCalendar } from 'store/global/calendar';\r\n\r\nimport { CalendarSync, CalendarSyncDataProps, CalendarSyncActionProps } from './CalendarSync';\r\nimport { FetchStatusAggregateTypes, getEntityStatus, EntityStatus } from 'store/global/fetch';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapState = (state: RootState): CalendarSyncDataProps => ({\r\n syncCalendar: state.global.calendar.syncIsActive,\r\n selectedCalendar: state.global.calendar.selectedCalendar,\r\n userId: state.global.session.userId,\r\n fetchCalendarStatus: !!state.global.session.userId\r\n ? getEntityStatus(state.global.fetch, state.global.session.userId, FetchStatusAggregateTypes.GET_CALENDAR)\r\n : EntityStatus.INITIAL,\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): CalendarSyncActionProps => ({\r\n setCalendarSync: (syncCalendar: boolean, userId: number) => {\r\n dispatch(setCalendarSync(userId, syncCalendar));\r\n },\r\n setSelectedCalendar: (id: string, userId: number) => {\r\n dispatch(setSelectedCalendar(userId, id));\r\n },\r\n});\r\n\r\nexport default connect(mapState, mapActionsToProps)(CalendarSync);\r\n","import * as React from 'react';\r\nimport { Mobile } from '../../../models/app/MobileOSType';\r\nimport { IconCheckmark } from 'components/icons';\r\nimport { EntityStatus } from 'store/global/fetch';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { ListItem } from '../notification-settings/ListItem';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface CalendarSyncDataProps {\r\n syncCalendar: boolean;\r\n userId?: number;\r\n selectedCalendar?: string;\r\n fetchCalendarStatus: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface CalendarSyncActionProps {\r\n setCalendarSync: (syncToggle: boolean, userId: number) => void;\r\n setSelectedCalendar: (id: string, userId: number) => void;\r\n}\r\n\r\nexport type CalendarSyncProps = CalendarSyncActionProps & CalendarSyncDataProps;\r\n\r\nexport const CalendarSync: React.FunctionComponent = ({\r\n syncCalendar,\r\n userId,\r\n selectedCalendar,\r\n fetchCalendarStatus,\r\n translate,\r\n setCalendarSync,\r\n setSelectedCalendar,\r\n}) => {\r\n const [lsCalendars, setLsCalendars] = React.useState<{ id: string; name: string }[] | undefined>(undefined);\r\n\r\n React.useEffect(() => {\r\n let LSCalendars = localStorage.getItem('calendars');\r\n if (LSCalendars) {\r\n setLsCalendars(JSON.parse(LSCalendars));\r\n }\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (syncCalendar) {\r\n localStorage.removeItem('calendars');\r\n setLsCalendars([]);\r\n Mobile.fetchCalendars();\r\n const interval = window.setInterval(() => {\r\n let LSCalendars = localStorage.getItem('calendars');\r\n if (LSCalendars) {\r\n setLsCalendars(JSON.parse(LSCalendars));\r\n window.clearInterval(interval);\r\n }\r\n }, 100);\r\n return () => {\r\n window.clearInterval(interval);\r\n };\r\n } else {\r\n setLsCalendars([]);\r\n }\r\n return () => {};\r\n }, [syncCalendar]);\r\n\r\n const changeValue = () => {\r\n if (userId !== undefined) {\r\n setCalendarSync(!syncCalendar, userId);\r\n }\r\n };\r\n\r\n const changeSelected = (id: string) => {\r\n if (userId !== undefined) {\r\n setSelectedCalendar(id, userId);\r\n }\r\n Mobile.setCalendarId(id);\r\n };\r\n\r\n return (\r\n
\r\n \r\n {/*Kalendrar */}\r\n {syncCalendar && fetchCalendarStatus === EntityStatus.SUCCESS && (\r\n
\r\n

{translate(SitecoreDictionary.Profile.CalendarSync.PickCalendar)}

\r\n
\r\n {lsCalendars &&\r\n lsCalendars.map(cal => (\r\n {\r\n changeSelected(cal.id);\r\n }}\r\n >\r\n
{cal.name}
\r\n
\r\n \r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n )}\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { SettingsPageHeader } from './settingsPageHeader';\r\nimport { Banner } from 'components/common';\r\nimport { SettingsPages } from '.';\r\nimport PaymentSettings from './paymentSettings';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport Profile from './profile';\r\nimport UserAccount from './userAccount';\r\nimport NotificationSettings from './notification-settings';\r\nimport TrainingPreferences from './trainingpreferences';\r\nimport CalendarSyncContainer from './calendarSync/';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface SettingBannerProps {\r\n className?: string;\r\n activeSettingsPage?: SettingsPages;\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n settingsPageTitle?: string;\r\n image: string;\r\n}\r\n\r\nexport const SettingBanner: React.SFC = props => {\r\n const getSettingsPage = (key: SettingsPages) => {\r\n switch (key) {\r\n case SettingsPages.Profile:\r\n return ;\r\n case SettingsPages.UserAccount:\r\n return ;\r\n case SettingsPages.PaymentSettings:\r\n return ;\r\n case SettingsPages.NotificationSettings:\r\n return ;\r\n case SettingsPages.CalendarSync:\r\n return ;\r\n case SettingsPages.TrainingPreferences:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n const getSettingsDescription = (key: SettingsPages) => {\r\n switch (key) {\r\n case SettingsPages.Profile:\r\n return props.translate(SitecoreDictionary.Profile.SectionDescription.Profile) as string;\r\n case SettingsPages.UserAccount:\r\n return props.translate(SitecoreDictionary.Profile.SectionDescription.Account) as string;\r\n case SettingsPages.PaymentSettings:\r\n return props.translate(SitecoreDictionary.Profile.SectionDescription.PaymentMethods) as string;\r\n case SettingsPages.NotificationSettings:\r\n return props.translate(SitecoreDictionary.Profile.SectionDescription.NotificationsSettings) as string;\r\n case SettingsPages.CalendarSync:\r\n return props.translate(SitecoreDictionary.Profile.Menu.CalendarSyncTitle) as string;\r\n case SettingsPages.TrainingPreferences:\r\n return props.translate(SitecoreDictionary.Profile.SectionDescription.TrainingPreferences) as string;\r\n default:\r\n return undefined;\r\n }\r\n };\r\n\r\n const renderPages = () => {\r\n return Object.keys(SettingsPages).map(key => (\r\n \r\n
\r\n {props.settingsPageTitle && (\r\n \r\n )}\r\n
{getSettingsPage((SettingsPages as any)[key])}
\r\n
\r\n \r\n ));\r\n };\r\n\r\n const hasActivePage = () => {\r\n return props.activeSettingsPage !== null && props.activeSettingsPage !== undefined;\r\n };\r\n\r\n const getBannerClasses = () => {\r\n let classes = ' Settings__Banner';\r\n const positionBottomClass = 'Settings__Banner--alignContentBottom';\r\n const positionTopClass = 'Settings__Banner--alignContentTop';\r\n const positionMiddleClass = 'Settings__Banner--alignContentMiddle';\r\n classes += hasActivePage() ? ' Settings__Banner--hasActivePage' : '';\r\n switch (props.activeSettingsPage) {\r\n case SettingsPages.Profile:\r\n classes += ` ${positionTopClass} `;\r\n break;\r\n case SettingsPages.PaymentSettings:\r\n classes += ` ${positionMiddleClass} `;\r\n break;\r\n case SettingsPages.UserAccount:\r\n classes += ` ${positionBottomClass} `;\r\n break;\r\n case SettingsPages.TrainingPreferences:\r\n classes += ` ${positionTopClass} `;\r\n break;\r\n case SettingsPages.NotificationSettings:\r\n classes += ` ${positionMiddleClass} `;\r\n break;\r\n default:\r\n classes += '';\r\n }\r\n return classes;\r\n };\r\n\r\n return (\r\n \r\n {!hasActivePage() && (\r\n
{props.translate(SitecoreDictionary.Settings.Banner)}
\r\n )}\r\n {props.isDesktopMode && renderPages()}\r\n
\r\n );\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getPageTitle } from 'store/location';\r\nimport { Settings, SettingsDataProps, SettingsLocalProps, SettingsActionProps } from './Settings';\r\nimport { logout } from 'store/auth';\r\nconst defaultImage = require('static/assets/background-login.jpg');\r\n\r\nconst mapState = (state: RootState, props: SettingsLocalProps): SettingsDataProps => {\r\n const translate = getTranslate(state.locale);\r\n const foereningId = state.global.session.activeFoerening;\r\n const foerening = state.foereningar.read.Foereningar.find(f => '' + f.Id === '' + foereningId);\r\n return {\r\n translate: translate,\r\n inloggadeFoereningar: state.global.session.inloggadeFoereningar,\r\n activeFoereing: foereningId as number,\r\n settingsPageTitle:\r\n props.activeSettingsPage !== null && props.activeSettingsPage !== undefined\r\n ? getPageTitle(state.location, false, translate) || undefined // Get the dependent page title which is visible in desktop mode\r\n : undefined,\r\n image:\r\n state.global.ui.image.images.settings === '' || !state.global.ui.image.images.settings\r\n ? defaultImage\r\n : state.global.ui.image.images.settings,\r\n shopActive: !!foerening ? foerening.AerButikAktiv : false,\r\n };\r\n};\r\n\r\nconst mapDispatchProps: SettingsActionProps = {\r\n logout,\r\n};\r\n\r\nexport default connect(mapState, mapDispatchProps)(Settings);\r\n","import * as React from 'react';\r\nimport { StatusBar, ConfirmationTextBox, MainButton, IconButton } from 'components/common';\r\n\r\nimport { SitecoreDictionary, ProductPaymentMethod } from 'models';\r\nimport { formatDate } from 'websd/utils';\r\nimport moment from 'moment';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface InternalTrainingCardDataProps {\r\n translate: TranslateFunction;\r\n errorOnBuy?: boolean;\r\n foereningId?: number;\r\n shopActive?: boolean;\r\n}\r\n\r\nexport interface ExternalTrainingCardDataProps {\r\n data?: fos.api.Traeningskort;\r\n}\r\n\r\nexport interface TrainingCardActionProps {\r\n buy?: (card: fos.api.Traeningskort) => void;\r\n terminate?: (payload: fos.api.AvslutaAbonnemangPayload) => void;\r\n}\r\n\r\nexport interface TrainingCardState {\r\n userIsInformed?: boolean;\r\n showConfirmation?: boolean;\r\n showStatusMessage?: boolean;\r\n}\r\n\r\nexport type TrainingCardDataProps = InternalTrainingCardDataProps & ExternalTrainingCardDataProps;\r\n\r\ntype TrainingCardProps = TrainingCardDataProps & TrainingCardActionProps;\r\n\r\nexport class TrainingCard extends React.Component, TrainingCardState> {\r\n confirmationText = this.props\r\n .translate(SitecoreDictionary.SubscriptionsAndCards.ConfirmTerminateSubscription)\r\n .toString();\r\n okStatusClass = 'StatusMessage--Green';\r\n errorStatusClass = 'StatusMessage--Black';\r\n\r\n constructor(props: TrainingCardProps) {\r\n super(props);\r\n\r\n this.state = {\r\n showConfirmation: false,\r\n showStatusMessage: false,\r\n userIsInformed: false,\r\n };\r\n\r\n this.showConfirmation = this.showConfirmation.bind(this);\r\n this.hideConfirmation = this.hideConfirmation.bind(this);\r\n this.terminateCard = this.terminateCard.bind(this);\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: TrainingCardProps) {\r\n if (\r\n ((newProps.data && newProps.data.StatusMessage) || (newProps.errorOnBuy && !this.props.errorOnBuy)) &&\r\n !this.state.userIsInformed\r\n ) {\r\n this.setState({ showStatusMessage: true, userIsInformed: true });\r\n setTimeout(\r\n () =>\r\n this.setState({\r\n ...this.state,\r\n showStatusMessage: false,\r\n userIsInformed: false,\r\n }),\r\n 4500\r\n );\r\n return true;\r\n } else if (!newProps.errorOnBuy && this.props.errorOnBuy) {\r\n this.setState({\r\n ...this.state,\r\n showStatusMessage: false,\r\n userIsInformed: false,\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n isAktiv() {\r\n return this.props.data && this.props.data.IsAktiv;\r\n }\r\n\r\n shouldWarn() {\r\n return (\r\n this.props.data &&\r\n this.props.data.AntalAaterstaaendeKlipp !== undefined &&\r\n this.props.data.AntalAaterstaaendeKlipp !== null &&\r\n this.props.data.AntalAaterstaaendeKlipp < 3\r\n );\r\n }\r\n\r\n getCardDetailsText() {\r\n if (\r\n this.props.data &&\r\n this.props.data.AntalAaterstaaendeKlipp !== undefined &&\r\n this.props.data.AntalAaterstaaendeKlipp !== null\r\n ) {\r\n return `${this.props\r\n .translate(SitecoreDictionary.SubscriptionsAndCards.NumberOfUnitsLeft)\r\n .toString()\r\n .replace('{unitsLeft}', this.props.data.AntalAaterstaaendeKlipp.toString())}\r\n ${'\\n'}${(this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidUntil) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Slutdatum as Date)\r\n )}`;\r\n } else if (this.props.data && this.props.data.TraeningskortStatus) {\r\n if (this.props.data.TraeningskortStatus === 'TERMINATED') {\r\n if (!!this.props.data.Slutdatum && moment(this.props.data.Slutdatum).isAfter(moment.now())) {\r\n return (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidUntil) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Slutdatum)\r\n );\r\n }\r\n return this.props.translate(SitecoreDictionary.SubscriptionsAndCards.Terminated) as string;\r\n }\r\n }\r\n if (this.isAktiv() && this.props.data) {\r\n let text = '';\r\n const isAutogiroProduct = this.props.data.PaymentMethod === ProductPaymentMethod.AutoGiro;\r\n if (isAutogiroProduct) {\r\n if (!!this.props.data.Startdatum && moment(this.props.data.Startdatum).isAfter(moment.now())) {\r\n text = (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidFrom) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Startdatum)\r\n );\r\n } else {\r\n text = this.props.translate(SitecoreDictionary.SubscriptionsAndCards.Valid) as string;\r\n }\r\n text += !!this.props.data.Bindningstid\r\n ? ' ' +\r\n (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.BoundUntil) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Bindningstid)\r\n )\r\n : '';\r\n } else {\r\n if (!!this.props.data.Startdatum && !!this.props.data.Slutdatum) {\r\n text = (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidBetween) as string)\r\n .replace('{0}', formatDate(this.props.data.Startdatum))\r\n .replace('{1}', formatDate(this.props.data.Slutdatum));\r\n } else if (!!this.props.data.Startdatum) {\r\n text = (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidFrom) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Startdatum)\r\n );\r\n } else if (!!this.props.data.Slutdatum) {\r\n text = (this.props.translate(SitecoreDictionary.SubscriptionsAndCards.ValidUntil) as string).replace(\r\n '{0}',\r\n formatDate(this.props.data.Slutdatum)\r\n );\r\n }\r\n }\r\n return text;\r\n }\r\n\r\n return this.props.translate(SitecoreDictionary.SubscriptionsAndCards.CardHasExpired) as string;\r\n }\r\n\r\n terminateCard() {\r\n if (this.props.terminate && this.props.data) {\r\n this.props.terminate({\r\n foereningsId: 1,\r\n abonnemangId: this.props.data.Id,\r\n productId: this.props.data.ProductId,\r\n });\r\n }\r\n this.setState({ ...this.state, userIsInformed: false });\r\n this.hideConfirmation();\r\n }\r\n\r\n getVisibleStatus() {\r\n if (this.state.showStatusMessage && this.props.data) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n showConfirmation() {\r\n this.setState({\r\n showConfirmation: !this.state.showConfirmation,\r\n });\r\n }\r\n\r\n hideConfirmation() {\r\n this.setState({\r\n showConfirmation: false,\r\n });\r\n }\r\n\r\n getStatusMessage() {\r\n if (this.props.data && this.props.data.StatusMessage) {\r\n return this.props.data.StatusMessage;\r\n } else if (this.props.errorOnBuy) {\r\n return SitecoreDictionary.SubscriptionsAndCards.ProductNotFound as string;\r\n }\r\n return SitecoreDictionary.UnknownError;\r\n }\r\n\r\n getStatusMessageClass() {\r\n if (this.props.data && this.props.data.StatusMessage === 'OK') {\r\n return this.okStatusClass;\r\n } else {\r\n return this.errorStatusClass;\r\n }\r\n }\r\n\r\n getCardActions() {\r\n const actions: JSX.Element[] = [];\r\n if (this.props.data && !!this.props.shopActive) {\r\n const extendButton = (\r\n (this.props.buy && this.props.data ? this.props.buy(this.props.data) : null)}\r\n />\r\n );\r\n const terminateButton = (\r\n this.showConfirmation()} />\r\n );\r\n if (this.props.data.IsRenewable || this.props.data.PaymentMethod !== ProductPaymentMethod.AutoGiro) {\r\n actions.push(extendButton);\r\n }\r\n if (this.props.data.IsTerminateEnabled) {\r\n actions.push(terminateButton);\r\n }\r\n }\r\n return actions;\r\n }\r\n\r\n render() {\r\n if (!!this.props.data) {\r\n return (\r\n
\r\n
\r\n
\r\n

{this.props.data.Namn}

\r\n
\r\n                {this.getCardDetailsText()}\r\n              
\r\n
\r\n
{this.getCardActions()}
\r\n
\r\n {this.state.showConfirmation && (\r\n \r\n )}\r\n\r\n \r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n
\r\n

\r\n

\r\n

\r\n
\r\n
\r\n );\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport {\r\n TrainingCardDataProps,\r\n ExternalTrainingCardDataProps,\r\n TrainingCard,\r\n TrainingCardActionProps,\r\n} from './TrainingCard';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getHasLoadFailed, FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { buyTrainingCardOnTheFly } from 'store/basket';\r\nimport { avslutaAbonnemang } from 'store/medlemskapOchKort';\r\n\r\nconst mapStateToProps = (state: RootState, props: ExternalTrainingCardDataProps): TrainingCardDataProps => {\r\n const foereningId = state.global.session.shopFoerening || state.global.session.activeFoerening;\r\n const foerening = state.foereningar.read.Foereningar.find(f => '' + f.Id === '' + foereningId);\r\n return {\r\n translate: getTranslate(state.locale),\r\n errorOnBuy:\r\n !!props &&\r\n !!props.data &&\r\n getHasLoadFailed(state.global.fetch, props.data.Id, FetchStatusAggregateTypes.PRODUCT_INFO),\r\n data: props.data,\r\n foereningId: foereningId,\r\n shopActive: !!foerening ? foerening.AerButikAktiv : undefined,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: TrainingCardActionProps = {\r\n buy: buyTrainingCardOnTheFly,\r\n terminate: avslutaAbonnemang,\r\n};\r\n\r\nexport const TrainingCardContainer = connect(mapStateToProps, mapDispatchToProps)(TrainingCard);\r\n","import { ThunkAction } from './../rootReducer';\r\nimport { api } from 'api';\r\nimport { Dispatch } from 'store';\r\nimport { getMedlemskapOchKort, MedlemskapOchKortReadActions, MedlemskapOchKortReadActionType } from './read';\r\nimport { updateAvslutaAbonnemangStatus } from './write';\r\nimport {\r\n executingCommand,\r\n executedCommand,\r\n executingCommandFailed,\r\n FetchCommandTypes,\r\n fetching,\r\n fetched,\r\n fetchedFailed,\r\n FetchStatusAggregateTypes,\r\n FetchAction,\r\n initialFetch,\r\n} from 'store/global/fetch';\r\nimport { getSubscriptionStatusMessage } from 'models';\r\n\r\nexport type Action = MedlemskapOchKortReadActions | FetchAction;\r\n\r\nexport const getAbonnemang = (foereningId: number): ThunkAction => dispatch => {\r\n dispatch(\r\n fetching(\r\n // It should be a real id if we use some Id to get the data from the api\r\n // But abonneman/Get has no parameters so we set it to -1\r\n -1,\r\n FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT\r\n )\r\n );\r\n\r\n return api.get(`Abonnemang/Get/${foereningId}`).then(\r\n res => {\r\n if (!res.error) {\r\n dispatch(getMedlemskapOchKort(res.result));\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT, res.result));\r\n } else {\r\n dispatch(getMedlemskapOchKort());\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT));\r\n }\r\n },\r\n err => {\r\n dispatch(getMedlemskapOchKort());\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT));\r\n }\r\n );\r\n};\r\n\r\nexport const resetMedlemskapOchKort = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: MedlemskapOchKortReadActionType.ClearMedlemskapOchKort,\r\n });\r\n dispatch(initialFetch(-1, FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT));\r\n};\r\n\r\nexport const avslutaAbonnemang = (payload: fos.api.AvslutaAbonnemangPayload): ThunkAction => (dispatch, getState) => {\r\n dispatch(executingCommand(payload.abonnemangId.toString(), FetchCommandTypes.AVSLUTA_MEDLEMSSKAP));\r\n const promise = api.post(\r\n 'Abonnemang/AvslutaAbonnemang/',\r\n payload,\r\n {\r\n muteErrorNotificationOnStatus: [400],\r\n }\r\n );\r\n promise.then(res => {\r\n // TODO Map status messages\r\n if (!res.error) {\r\n dispatch(\r\n updateAvslutaAbonnemangStatus(\r\n payload.abonnemangId,\r\n getSubscriptionStatusMessage(res.result.status),\r\n payload.abonnemangId.toString(),\r\n res.result.endDate\r\n )\r\n );\r\n dispatch(executedCommand(payload.abonnemangId.toString(), FetchCommandTypes.AVSLUTA_MEDLEMSSKAP));\r\n } else {\r\n if (res.result.http && res.result.http.response) {\r\n dispatch(\r\n updateAvslutaAbonnemangStatus(\r\n payload.abonnemangId,\r\n getSubscriptionStatusMessage(res.result.http.response.status),\r\n payload.abonnemangId.toString()\r\n )\r\n );\r\n } else {\r\n dispatch(\r\n updateAvslutaAbonnemangStatus(\r\n payload.abonnemangId,\r\n getSubscriptionStatusMessage('UNKNOWN_ERROR'),\r\n payload.abonnemangId.toString()\r\n )\r\n );\r\n }\r\n dispatch(executingCommandFailed(payload.abonnemangId.toString(), FetchCommandTypes.AVSLUTA_MEDLEMSSKAP));\r\n }\r\n });\r\n return promise;\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { formatDate } from 'websd/utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface SubscriptionDataProps {\r\n data?: fos.api.Medlemskap;\r\n translate: TranslateFunction;\r\n hideRenewButton?: boolean;\r\n shopActive?: boolean;\r\n}\r\n\r\ninterface SubscriptionActionProps {\r\n buy?: (item: fos.api.Medlemskap) => void;\r\n}\r\n\r\ntype SubscriptionProps = SubscriptionDataProps & SubscriptionActionProps;\r\n\r\nexport const Subscription: React.SFC> = props => {\r\n const isAktiv = () => props.data && props.data.IsAktiv;\r\n\r\n const shouldWarn = () => !isAktiv(); // TODO ouyo Check the warn conditions\r\n\r\n const getSubscriptionDetailsText = (): string => {\r\n return isAktiv() && props.data\r\n ? `${props.translate(SitecoreDictionary.SubscriptionsAndCards.Valid) as string} ${formatDate(\r\n props.data.Startdatum as Date\r\n )} - ${formatDate(props.data.Slutdatum as Date)}`\r\n : (props.translate(SitecoreDictionary.SubscriptionsAndCards.MembershipHasExpired) as string);\r\n };\r\n\r\n if (props.data) {\r\n return (\r\n
\r\n
\r\n

{props.data.Namn}

\r\n
\r\n            {getSubscriptionDetailsText()}\r\n          
\r\n
\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n
\r\n

\r\n

\r\n

\r\n
\r\n
\r\n );\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { formatDate } from 'websd/utils';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { routesMap, LocationActionTypes } from 'store/location';\r\n\r\nexport interface ReceiptsProps {\r\n receipt?: fos.api.ReceiptInfo;\r\n}\r\n\r\nexport const SubscriptionReceipt: React.FunctionComponent = ({ receipt }) => {\r\n if (receipt) {\r\n return (\r\n {receipt.Pris + ' ' + receipt.Valuta}

\r\n
{formatDate(receipt.Datum)}
\r\n
\r\n \r\n );\r\n } else {\r\n return (\r\n
\r\n
\r\n

\r\n

\r\n

\r\n
\r\n
\r\n );\r\n }\r\n};\r\n","import { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { SubscriptionsAndCards, SubscriptionsActionProps, SubscriptionsDataProps } from './SubscriptionsAndCards';\r\nimport { getAbonnemang, resetMedlemskapOchKort } from 'store/medlemskapOchKort';\r\nimport { buySubscriptionOnTheFly } from 'store/basket';\r\nimport { getEntityStatus, FetchStatusAggregateTypes, EntityStatus } from 'store/global/fetch';\r\nimport { getReceiptInfos } from 'store/payment';\r\n\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapState = (state: RootState): SubscriptionsDataProps => {\r\n const aktivFoerening = state.foereningar.read.Foereningar.find(\r\n f => '' + f.Id === '' + state.global.session.activeFoerening\r\n );\r\n const medlemskapOchKortStatus = getEntityStatus(\r\n state.global.fetch,\r\n -1,\r\n FetchStatusAggregateTypes.MEDLEMSKAP_OCH_KORT\r\n );\r\n const receiptInfosStatus = getEntityStatus(state.global.fetch, -1, FetchStatusAggregateTypes.RECEIPT_INFOS);\r\n return {\r\n abonnemang: state.abonnemang.read.Abonnemang,\r\n receipts: state.payment.read.receiptInfos,\r\n isFetching:\r\n medlemskapOchKortStatus === EntityStatus.FETCHING ||\r\n medlemskapOchKortStatus === EntityStatus.FETCHING_IN_BACKGROUND ||\r\n receiptInfosStatus === EntityStatus.FETCHING ||\r\n receiptInfosStatus === EntityStatus.FETCHING_IN_BACKGROUND,\r\n activeFoerening: state.global.session.activeFoerening,\r\n shopActive: !!aktivFoerening ? aktivFoerening.AerButikAktiv : undefined,\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst mapDispatch: SubscriptionsActionProps = {\r\n getAbonnemang,\r\n getReceiptInfos,\r\n resetMedlemskapOchKort,\r\n buySubscription: buySubscriptionOnTheFly,\r\n};\r\n\r\nexport default connect(mapState, mapDispatch)(SubscriptionsAndCards);\r\n","import * as React from 'react';\r\nimport { Banner, MainButton, SmallHeader } from 'components/common';\r\nimport background from 'static/assets/tanka_traening.png';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as LocationAction } from 'store/location/locationActions';\r\nimport { TrainingCardContainer } from './TrainingCard/TrainingCardContainer';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { Subscription } from './Subscription';\r\nimport { SubscriptionReceipt } from './SubscriptionReceipt';\r\n\r\nexport interface SubscriptionsDataProps {\r\n abonnemang?: fos.api.Abonnemang;\r\n receipts?: fos.api.ReceiptInfo[];\r\n isFetching: boolean;\r\n activeFoerening?: number;\r\n shopActive?: boolean;\r\n readonly translate: TranslateFunction;\r\n}\r\n\r\nexport interface SubscriptionsActionProps {\r\n getAbonnemang: (foreningId: number) => void;\r\n getReceiptInfos: (foereningId: number) => void;\r\n resetMedlemskapOchKort: () => void;\r\n buySubscription: (item: fos.api.Medlemskap) => void;\r\n}\r\n\r\ntype SubscriptionsProps = SubscriptionsDataProps & SubscriptionsActionProps;\r\n\r\nexport const SubscriptionsAndCards: React.FunctionComponent = ({\r\n abonnemang,\r\n receipts,\r\n isFetching,\r\n activeFoerening,\r\n shopActive,\r\n translate,\r\n getAbonnemang,\r\n getReceiptInfos,\r\n resetMedlemskapOchKort,\r\n buySubscription,\r\n}) => {\r\n React.useEffect(() => {\r\n if (activeFoerening) {\r\n getAbonnemang(activeFoerening);\r\n getReceiptInfos(activeFoerening);\r\n }\r\n return () => {\r\n resetMedlemskapOchKort();\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const subscriptions = () => {\r\n return (\r\n
\r\n {isFetching || (abonnemang && abonnemang.MedlemskapLista && abonnemang.MedlemskapLista.length > 0) ? (\r\n \r\n ) : (\r\n
Du har inget medlemskap.
\r\n )}\r\n {isFetching && }\r\n {!isFetching &&\r\n abonnemang &&\r\n abonnemang.MedlemskapLista &&\r\n abonnemang.MedlemskapLista.map(sub => (\r\n \r\n ))}\r\n
\r\n );\r\n };\r\n\r\n const trainingCards = () => {\r\n return (\r\n
\r\n {(isFetching || (abonnemang && abonnemang.TraeningskortLista && abonnemang.TraeningskortLista.length > 0)) && (\r\n \r\n )}\r\n {isFetching && }\r\n {!isFetching &&\r\n abonnemang &&\r\n abonnemang.TraeningskortLista &&\r\n abonnemang.TraeningskortLista.map(card => )}\r\n
\r\n );\r\n };\r\n\r\n const renderReceipts = () => {\r\n return (\r\n
\r\n {(isFetching || (receipts && receipts.length > 0)) && (\r\n \r\n )}\r\n {isFetching && }\r\n {!isFetching && receipts && receipts.map(receipt => )}\r\n
\r\n );\r\n };\r\n\r\n const getBanner = () => {\r\n return (\r\n \r\n

\r\n {translate(SitecoreDictionary.SubscriptionsAndCards.BannerText).toString()}\r\n

\r\n \r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n return (\r\n
\r\n
\r\n {subscriptions()}\r\n {trainingCards()}\r\n {renderReceipts()}\r\n
\r\n {!!shopActive &&
{getBanner()}
}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface DetailsBlockDesktopProps {\r\n translate: TranslateFunction;\r\n pass: fos.api.PassDetails;\r\n}\r\n\r\nexport const DetailsBlockDesktop: React.FunctionComponent = ({ translate, pass }) => {\r\n const mStartTime = moment(pass.StartTime);\r\n const mEndTime = moment(pass.EndTime);\r\n const dayAndMonth = mStartTime.format('LL');\r\n const day = mStartTime.format('dddd');\r\n const startTime = mStartTime.format('HH:mm');\r\n const endTime = mEndTime.format('HH:mm');\r\n\r\n return (\r\n
\r\n
\r\n
    \r\n {pass.Instruktoerer.map(name => (\r\n
  • {name}
  • \r\n ))}\r\n
\r\n
\r\n
\r\n {startTime && (\r\n
\r\n {day}\r\n
\r\n )}\r\n {startTime &&
{dayAndMonth}
}\r\n
\r\n
\r\n
{`${startTime} - ${endTime}`}
\r\n
{pass.Length} min
\r\n
\r\n
\r\n
{pass.AnlaeggningsNamn}
\r\n
{pass.Lokal}
\r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface HeaderProps {\r\n header?: string;\r\n}\r\n\r\nexport const Header: React.SFC = ({ header }) => {\r\n return (\r\n
\r\n

{header}

\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { IconCheckmark } from '../icons/IconCheckMark';\r\n\r\ninterface TickersProps {\r\n tickers: Array;\r\n}\r\n\r\nexport const Tickers: React.SFC = ({ tickers }) => {\r\n if (tickers && tickers.length) {\r\n return (\r\n
\r\n {tickers.map((ticker, index) => (\r\n
\r\n \r\n {ticker}\r\n
\r\n ))}\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n","// Uses react-youtube: https://github.com/troybetz/react-youtube\r\n\r\nimport * as React from 'react';\r\nimport YouTube from 'react-youtube';\r\nimport { IconPlay } from 'components/icons';\r\nimport { Header } from './Header';\r\nimport { Tickers } from './Tickers';\r\n\r\ntype youtubeEventButton = Event & { target: { playVideo: () => void } };\r\n\r\ninterface YouTubeVideoProps {\r\n videoId: string;\r\n placeholderUrl: string;\r\n imageUrl?: string;\r\n buttonText?: string;\r\n header?: string;\r\n tickers: Array;\r\n}\r\n\r\ninterface YouTubeVideoState {\r\n videoStarted: boolean;\r\n videoPaused: boolean;\r\n}\r\n\r\nexport class YouTubeVideo extends React.Component {\r\n PlayButton: HTMLElement | null;\r\n\r\n constructor(props: YouTubeVideoProps) {\r\n super(props);\r\n\r\n this.PlayButton = null;\r\n\r\n this.state = {\r\n videoStarted: false,\r\n videoPaused: false,\r\n };\r\n }\r\n\r\n playVideo() {\r\n this.setState({\r\n videoStarted: true,\r\n videoPaused: false,\r\n });\r\n }\r\n\r\n stopVideo() {\r\n this.setState({\r\n videoStarted: false,\r\n videoPaused: false,\r\n });\r\n }\r\n\r\n pauseVideo() {\r\n this.setState({\r\n videoPaused: true,\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n videoId,\r\n // placeholderUrl,\r\n buttonText,\r\n } = this.props;\r\n // TODO style={{ backgroundImage: `url('${placeholderUrl}'` }}\r\n return (\r\n \r\n
\r\n
\r\n \r\n {\r\n this.PlayButton = input;\r\n }}\r\n onClick={() => this.playVideo()}\r\n >\r\n
\r\n \r\n
\r\n {buttonText &&
{buttonText}
}\r\n
\r\n
\r\n this.bindPlayButtonClick(event as youtubeEventButton)}\r\n onEnd={() => this.stopVideo()}\r\n onPause={() => this.pauseVideo()}\r\n onPlay={() => this.playVideo()}\r\n />\r\n
\r\n );\r\n }\r\n\r\n bindPlayButtonClick(event: youtubeEventButton) {\r\n if (this.PlayButton != null && event && event.target) {\r\n this.PlayButton.onclick = () => event && event.target && event.target.playVideo();\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Header } from './Header';\r\nimport { Tickers } from './Tickers';\r\nimport { Banner } from '../common';\r\n\r\ninterface HeroImageProps {\r\n imageUrl?: string;\r\n header?: string;\r\n tickers: Array;\r\n}\r\n\r\nexport class HeroImage extends React.Component {\r\n render() {\r\n const { header, tickers } = this.props;\r\n return (\r\n \r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { YouTubeVideo, HeroImage } from '../media';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nconst fosURL = process.env.REACT_APP_FOS_URL as string;\r\n\r\ninterface PassDetailsHeroBannerProps {\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n pass: fos.api.PassDetails;\r\n}\r\n\r\nexport const PassDetailsHeroBanner: React.FunctionComponent = ({\r\n translate,\r\n isDesktopMode,\r\n pass,\r\n}) => {\r\n const shouldShowVideo = !!pass.YoutubeVideoId;\r\n\r\n const shouldShowHeroBild = !shouldShowVideo && ((pass.HeroBild && !isDesktopMode) || isDesktopMode);\r\n\r\n return (\r\n
\r\n {shouldShowVideo && pass.YoutubeVideoId && (\r\n \r\n )}\r\n {shouldShowHeroBild && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ntype FontWeight = 'normal' | 'bold';\r\ntype FontSize = 'mini' | 'small' | 'medium' | 'large';\r\n\r\ninterface ShortListProps {\r\n header: string;\r\n list?: Array;\r\n large: boolean;\r\n fontWeight?: FontWeight;\r\n fontSize?: FontSize;\r\n}\r\n\r\nfunction getFontWeight(props: ShortListProps): string {\r\n const fontWeightBold = 'ShortList--font-weight-bold';\r\n if (props.fontWeight === 'normal') {\r\n return 'ShortList--font-weight-normal';\r\n } else if (!props.fontWeight || props.fontWeight === 'bold') {\r\n return fontWeightBold;\r\n }\r\n return fontWeightBold;\r\n}\r\n\r\nfunction getFontSize(props: ShortListProps): string {\r\n const fontSizeSmall = 'ShortList--font-size-small';\r\n if (props.fontSize === 'mini') {\r\n return 'ShortList--font-size-mini';\r\n } else if (!props.fontWeight || props.fontSize === 'small') {\r\n return fontSizeSmall;\r\n }\r\n return fontSizeSmall;\r\n}\r\n\r\nexport class ShortList extends React.Component {\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n if (!this.props.list || !this.props.list.length) {\r\n return null;\r\n }\r\n return (\r\n
\r\n

{this.props.header}

\r\n
    \r\n {this.props.list.map(item => (\r\n
  • \r\n {item}\r\n
  • \r\n ))}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","export enum ScheduleFilterCategoryName {\r\n Favoritfilter = 'Favoritfilter',\r\n Traeningsstaelle = 'Traeningsstaelle',\r\n Traeningspass = 'Traeningspass',\r\n LedareOrTraenare = 'LedareOrTraenare',\r\n Tidpunkt = 'Tidpunkt',\r\n Veckodag = 'Veckodag',\r\n Bokningsstatus = 'Bokningsstatus',\r\n}\r\n\r\nexport interface ScheduleFilter {\r\n Favoritfilter: string[];\r\n Traeningsstaelle: string[];\r\n Traeningspass: string[];\r\n LedareOrTraenare: string[];\r\n Tidpunkt: string[];\r\n Veckodag: string[];\r\n Bokningsstatus: string[];\r\n}\r\n\r\nexport type ScheduleFilterCategoryNames =\r\n | 'Favoritfilter'\r\n | 'Traeningsstaelle'\r\n | 'Traeningspass'\r\n | 'LedareOrTraenare'\r\n | 'Tidpunkt'\r\n | 'Veckodag'\r\n | 'Bokningsstatus';\r\n","import * as React from 'react';\r\nimport { IconArrow } from '../icons';\r\n\r\nexport interface SummaryProps {\r\n header: string;\r\n fullText: string;\r\n}\r\n\r\nexport class Summary extends React.Component {\r\n bodyn: HTMLSpanElement | null = null;\r\n observer: ResizeObserver | null = new ResizeObserver(entries => {\r\n for (let entry of entries) {\r\n entry.target.classList[entry.target.scrollWidth > entry.contentRect.width ? 'add' : 'remove']('truncated');\r\n }\r\n });\r\n\r\n componentWillUnmount() {\r\n if (this.observer) {\r\n this.observer.disconnect();\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

{this.props.header}

\r\n
\r\n \r\n {\r\n if (this.observer && this.bodyn) {\r\n this.observer.unobserve(this.bodyn);\r\n }\r\n this.bodyn = r;\r\n if (this.observer && this.bodyn) {\r\n this.observer.observe(this.bodyn);\r\n }\r\n }}\r\n dangerouslySetInnerHTML={{ __html: this.props.fullText }}\r\n />\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport PassBookerContainer from 'components/common/booking/PassBookerContainer';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport {\r\n OK_STATUS_CLASS,\r\n ERROR_STATUS_CLASS,\r\n // NOT_BOOKABLE_STATUSES\r\n} from './model';\r\nimport { BokningsStatusEnum } from 'models';\r\nimport { StatusBar } from 'components/common';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface SlotsProps {\r\n bokningar: Array;\r\n translate: TranslateFunction;\r\n pass: fos.api.PassDetails;\r\n}\r\n\r\nexport const Slots: React.FunctionComponent = ({ bokningar, translate, pass }) => {\r\n const [statusMessageVisible, setStatusMessageVisible] = React.useState(false);\r\n const [userInformed, setUserInformed] = React.useState(true);\r\n const [statusMessageText, setStatusMessageText] = React.useState('');\r\n const [timeout, setTimeout] = React.useState();\r\n\r\n React.useEffect(() => {\r\n if (!userInformed && !!pass.statusMessage) {\r\n if (!!timeout) {\r\n window.clearTimeout(timeout);\r\n }\r\n setUserInformed(true);\r\n setStatusMessageText(pass.statusMessage);\r\n setStatusMessageVisible(true);\r\n\r\n const t = window.setTimeout(() => {\r\n setStatusMessageVisible(false);\r\n setStatusMessageText('');\r\n }, 4500);\r\n setTimeout(t);\r\n }\r\n }, [userInformed, pass, timeout]);\r\n\r\n const getStatusMessageClass = () => {\r\n if (\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.OK_BOOK ||\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.QUEUED ||\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return OK_STATUS_CLASS;\r\n } else {\r\n return ERROR_STATUS_CLASS;\r\n }\r\n };\r\n\r\n const getPassStatus = (): 'Booked' | 'NotBooked' | 'Queued' => {\r\n const bookedPass = bokningar.find(b => b.PassId === pass.PassId);\r\n return !bookedPass ? 'NotBooked' : bookedPass.Koad ? 'Queued' : 'Booked';\r\n };\r\n\r\n const getIconButtonStyle = () => {\r\n switch (getPassStatus()) {\r\n case 'Booked':\r\n return '--Booked';\r\n case 'Queued':\r\n return '--BookedWithQueue';\r\n default:\r\n switch (pass.BokningStatus) {\r\n case BokningsStatusEnum.EJ_BOKNINGSBART_DATE_DROPIN:\r\n return '--NotAvailableYet';\r\n case BokningsStatusEnum.FOERTIDIGT_FOER_ATT_BOKA:\r\n return '--EarlyToBook';\r\n case BokningsStatusEnum.FOERSENT_FOER_ATT_BOKA:\r\n return '--LateToBook';\r\n case BokningsStatusEnum.BOKNINGSBART:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_DROPIN:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.FULLT || BokningsStatusEnum.FULLT_DROPIN:\r\n return '--MaxCapacity';\r\n case BokningsStatusEnum.DROPIN:\r\n return '--Dropin';\r\n case BokningsStatusEnum.INSTAELLD:\r\n return '--Cancelled';\r\n default:\r\n return '--Available';\r\n }\r\n }\r\n };\r\n return (\r\n
\r\n {pass.BokningStatus !== 'DROPIN' && (\r\n
\r\n {pass.AntalLedigaPlatser}\r\n
\r\n
{translate(SitecoreDictionary.PassItem.EmptyPlaces)}
\r\n
\r\n {translate(SitecoreDictionary.PassItem.Total)} {pass.AntalPlatserTotal} platser\r\n
\r\n
\r\n
\r\n {\r\n setUserInformed(false);\r\n }}\r\n />\r\n
\r\n
\r\n )}\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface InfoProps {\r\n icon: React.ReactNode;\r\n header: string | React.ReactNode;\r\n textColor?: string;\r\n infoText?: string;\r\n}\r\n\r\nexport class Info extends React.Component {\r\n renderInfoSection() {\r\n const { header, infoText } = this.props;\r\n\r\n return (\r\n
\r\n {header}\r\n {!!infoText && {infoText}}\r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { icon, textColor } = this.props;\r\n\r\n return (\r\n
\r\n
{icon}
\r\n {this.renderInfoSection()}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Overlay } from '../common';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface BookingRulesDataProps {\r\n foereningar: FoereningInternal[];\r\n focusedFoerening?: FoereningInternal;\r\n activeFoerning: number;\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface BookingRulesActionProps {\r\n fetchReglerIfNotInStore: (id: number) => void;\r\n setFocusOnFoerening: (id: number) => void;\r\n}\r\n\r\nexport interface BookingRulesLocalProps {\r\n Id: number;\r\n visible: boolean;\r\n}\r\n\r\nexport type BookingRulesProps = Readonly;\r\nexport class BookingRules extends React.Component {\r\n constructor(props: BookingRulesProps) {\r\n super(props);\r\n this.toggle = this.toggle.bind(this);\r\n\r\n this.state = {\r\n Id: this.props.activeFoerning,\r\n visible: false,\r\n };\r\n }\r\n\r\n toggle() {\r\n this.props.fetchReglerIfNotInStore(this.state.Id);\r\n this.setState({\r\n visible: !this.state.visible,\r\n });\r\n }\r\n\r\n componentDidMount() {\r\n this.props.setFocusOnFoerening(this.props.activeFoerning);\r\n this.props.fetchReglerIfNotInStore(this.state.Id);\r\n }\r\n\r\n render() {\r\n const translate = this.props.translate;\r\n return (\r\n
\r\n

this.toggle()}>\r\n {translate(SitecoreDictionary.Schedule.ShowRules)}\r\n

\r\n {this.state.visible && (\r\n \r\n
\r\n

Bokningsregler

\r\n
\r\n {this.props.focusedFoerening && this.props.focusedFoerening.RuleText ? (\r\n \r\n ) : (\r\n
\r\n )}\r\n
\r\n\r\n {!this.props.isDesktopMode && (\r\n \r\n )}\r\n
\r\n \r\n )}\r\n
\r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { BookingRules, BookingRulesActionProps, BookingRulesDataProps } from './BookingRules';\r\nimport { fetchReglerIfNotInStore } from 'store/foereningar';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { setFocusOnFoerening } from 'store/global/ui/bookingRules';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): BookingRulesDataProps => {\r\n return {\r\n // Todo fix problem with no match without toString() == toString()\r\n foereningar: state.foereningar.read.Foereningar.filter(i =>\r\n state.global.session.inloggadeFoereningar.find(j => j.Id.toString() === i.Id.toString())\r\n ),\r\n activeFoerning: state.global.session.activeFoerening as number,\r\n isDesktopMode: props.isDesktopMode,\r\n translate: getTranslate(state.locale),\r\n focusedFoerening: state.foereningar.read.Foereningar.find(\r\n i => i.Id.toString() === state.global.ui.bookingRules.focusedFoereningId.toString()\r\n ),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): BookingRulesActionProps => ({\r\n fetchReglerIfNotInStore: (foerening: number) => dispatch(fetchReglerIfNotInStore(foerening)),\r\n setFocusOnFoerening: (id: number) => dispatch(setFocusOnFoerening(id)),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(BookingRules);\r\n","import * as React from 'react';\r\nimport { Slots } from './Slots';\r\nimport { Info } from './Info';\r\nimport BookingRules from 'components/bookingRules';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nimport { IconMessage, IconDrop, IconInformation } from 'components/icons';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface InfoBlockProps {\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n pass: fos.api.PassDetails;\r\n bokningar: fos.api.Bokning[];\r\n}\r\n\r\nexport const PassDetailsInfoBlock: React.FunctionComponent = ({\r\n translate,\r\n isDesktopMode,\r\n pass,\r\n bokningar,\r\n}) => (\r\n
\r\n \r\n }\r\n header={pass.AntalDropinPlatser + ' ' + (translate(SitecoreDictionary.PassDetails.XDropsAvailable) as string)}\r\n infoText={translate(SitecoreDictionary.PassDetails.DropInRule) as string}\r\n />\r\n {pass.ExtraInfo && } header={pass.ExtraInfo} />}\r\n } header={} textColor=\"#e31836\" />\r\n
\r\n);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { ShortList } from '../text';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface DetailsBlockMobileProps {\r\n translate: TranslateFunction;\r\n pass: fos.api.PassDetails;\r\n}\r\n\r\nexport const DetailsBlockMobile: React.FunctionComponent = ({ translate, pass }) => {\r\n const getTimeAndPlace = () => {\r\n const startTime = moment(pass.StartTime);\r\n const endTime = moment(pass.EndTime);\r\n const start = startTime.format('HH:mm');\r\n const end = endTime.format('HH:mm');\r\n const date = startTime.format('D MMMM');\r\n const day = startTime.format('dddd');\r\n const upperDay = day.replace(/^\\w/, c => c.toUpperCase());\r\n\r\n return [\r\n `${upperDay} ${date} ${start} - ${end} (${pass.Length} min)`,\r\n `${pass.Lokal.length > 0 ? pass.Lokal.join(', ') + ', ' : ''}${pass.AnlaeggningsNamn}`,\r\n ];\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { Summary } from '../text';\r\nimport { PassDetailsInfoBlock } from './PassDetailsInfoBlock';\r\nimport { DetailsBlockMobile } from './DetailsBlockMobile';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface PassDetailsContentProps {\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n pass: fos.api.PassDetails;\r\n bokningar: fos.api.Bokning[];\r\n}\r\n\r\nexport const PassDetailsContent: React.FunctionComponent = ({\r\n translate,\r\n isDesktopMode,\r\n pass,\r\n bokningar,\r\n}) => (\r\n
\r\n
\r\n {pass.Beskrivning ? (\r\n \r\n ) : (\r\n
Tyvärr finns det ingen information om den här träningsformen
\r\n )}\r\n
\r\n {!isDesktopMode && }\r\n\r\n \r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\ninterface PassDetailsHeroBannerSkeletonProps {\r\n isDesktop: boolean;\r\n}\r\n\r\nexport const PassDetailsHeroBannerSkeleton: React.SFC = props => (\r\n
\r\n {props.isDesktop && (\r\n
\r\n {/* eslint-disable-next-line jsx-a11y/heading-has-content */}\r\n

\r\n

\r\n

\r\n )}\r\n
\r\n);\r\n","import * as React from 'react';\r\nimport { PassDetailsHeroBannerSkeleton } from './PassDetailsHeroBannerSkeleton';\r\n// import { DetailsBlockDesktopSkeleton } from './DetailsBlockDesktopSkeleton';\r\n// import { PassDetailsContentSkeleton } from './PassDetailsContentSkeleton';\r\n\r\ninterface PassDetailsSkeletonProps {\r\n isDesktop: boolean;\r\n}\r\n\r\nexport const PassDetailsSkeleton: React.SFC = props => (\r\n
\r\n \r\n {/* {props.isDesktop && }\r\n */}\r\n
\r\n);\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface PassDetailsFailedFetchProps {\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport const PassDetailsFailedFetch: React.SFC = props => (\r\n
\r\n
\r\n

{props.translate(SitecoreDictionary.PassDetails.LoadingFailed) as string}

\r\n
\r\n
\r\n);\r\n","import { ThunkAction } from 'store/rootReducer';\r\nimport {\r\n fetched,\r\n FetchStatusAggregateTypes,\r\n fetchedFailed,\r\n fetching,\r\n fetchingInBackground,\r\n FetchingAction,\r\n FetchingInBackgroundAction,\r\n} from 'store/global/fetch';\r\nimport { api } from 'api';\r\nimport { constructSafeName } from 'utils';\r\n\r\nimport { updatePassDetailsData } from './read';\r\n\r\nconst fetchPassDetailsInternal = (\r\n passId: string,\r\n anlaeggningsId: string,\r\n fetchingMethod: (\r\n id: number | string,\r\n aggregateType: FetchStatusAggregateTypes\r\n ) => FetchingAction | FetchingInBackgroundAction\r\n): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n const foereningId = state.global.session.activeFoerening;\r\n const aktivFoerening = foereningId\r\n ? state.global.session.inloggadeFoereningar.find(f => f.Id.toString() === foereningId.toString())\r\n : null;\r\n if (foereningId && aktivFoerening) {\r\n dispatch(fetchingMethod(passId, FetchStatusAggregateTypes.PASS));\r\n let url = `pass/GetPass?foereningsId=${aktivFoerening.Id}&passId=${passId}&foerening=${constructSafeName(\r\n aktivFoerening.Namn\r\n )}&anlaeggningsId=${anlaeggningsId}`;\r\n let promise = api.get(url, {\r\n muteErrorNotificationOnStatus: [406],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n let pass: fos.api.PassDetails = result.result;\r\n dispatch(updatePassDetailsData(pass));\r\n dispatch(fetched(passId, FetchStatusAggregateTypes.PASS, pass));\r\n } else {\r\n dispatch(fetchedFailed(passId, FetchStatusAggregateTypes.PASS));\r\n }\r\n });\r\n return promise;\r\n }\r\n dispatch(fetchedFailed(passId, FetchStatusAggregateTypes.PASS));\r\n\r\n return null;\r\n};\r\n\r\nexport const fetchPassDetails = (passId: string, anlaeggningsId: string): ThunkAction => (dispatch, getState) => {\r\n return dispatch(fetchPassDetailsInternal(passId, anlaeggningsId, fetching));\r\n};\r\n\r\nexport const fetchPassDetailsInBackground = (passId: string, anlaeggningsId: string): ThunkAction => (\r\n dispatch,\r\n getState\r\n) => {\r\n return dispatch(fetchPassDetailsInternal(passId, anlaeggningsId, fetchingInBackground));\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { PassDetails, PassDetailsActionProps, PassDetailsExternalDataProps, PassDetailsDataProps } from './PassDetails';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { fetchPassDetails } from 'store/pass-details/passDetailsThunks';\r\nimport { getBookingsInBackground } from 'store/bokningar/bokningarThunks';\r\nimport {\r\n getIsFetching,\r\n FetchStatusAggregateTypes,\r\n getHasLoadFailed,\r\n getIsFetchingInBackgound,\r\n} from 'store/global/fetch';\r\n\r\nconst mapState = (state: RootState, props: PassDetailsExternalDataProps): PassDetailsDataProps => {\r\n const passId =\r\n state.location.payload && state.location.payload.passId\r\n ? (state.location.payload.passId as string).trim()\r\n : state.passDetails.read.pass\r\n ? state.passDetails.read.pass.PassId\r\n : undefined;\r\n let anlaeggningsId;\r\n for (let i = 0; i < state.pass.read.days.length; i++) {\r\n const pass = state.pass.read.days[i].items.find(p => p.PassId === passId);\r\n if (!!pass) {\r\n anlaeggningsId = pass.AnlaeggningsId;\r\n break;\r\n }\r\n }\r\n return {\r\n passId,\r\n anlaeggningsId: anlaeggningsId,\r\n pass: state.passDetails.read.pass,\r\n translate: getTranslate(state.locale),\r\n fetchFailed:\r\n !!passId &&\r\n !(\r\n !!state.global.session.activeFoerening &&\r\n getIsFetching(state.global.fetch, state.global.session.activeFoerening, FetchStatusAggregateTypes.PASS_LIST)\r\n ) &&\r\n getHasLoadFailed(state.global.fetch, passId, FetchStatusAggregateTypes.PASS),\r\n isFetching:\r\n !!passId &&\r\n (getIsFetching(state.global.fetch, passId, FetchStatusAggregateTypes.PASS) ||\r\n getIsFetchingInBackgound(state.global.fetch, passId, FetchStatusAggregateTypes.PASS)),\r\n bokningar: state.bokningar.bokningar,\r\n\r\n ...props,\r\n };\r\n};\r\n\r\nconst mapDispatch: PassDetailsActionProps = {\r\n fetchPassDetails,\r\n getBookingsInBackground,\r\n};\r\n\r\nexport default connect(mapState, mapDispatch)(PassDetails);\r\n","import * as React from 'react';\r\n\r\nimport { DetailsBlockDesktop } from './DetailsBlockDesktop';\r\nimport { PassDetailsHeroBanner } from './PassDetailsHeroBanner';\r\nimport { PassDetailsContent } from './PassDetailsContent';\r\nimport { PassDetailsSkeleton } from './pass-details-skeletons';\r\nimport { PassDetailsFailedFetch } from './PassDetailsFailedFetch';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PassDetailsInternalDataProps {\r\n pass?: fos.api.PassDetails;\r\n translate: TranslateFunction;\r\n passId?: string;\r\n anlaeggningsId?: string;\r\n fetchFailed: boolean;\r\n isFetching: boolean;\r\n bokningar: fos.api.Bokning[];\r\n}\r\n\r\nexport interface PassDetailsExternalDataProps {\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface PassDetailsActionProps {\r\n fetchPassDetails: (passId: string, anlaeggningsId: string) => void;\r\n getBookingsInBackground: () => void;\r\n}\r\n\r\nexport type PassDetailsDataProps = PassDetailsInternalDataProps & PassDetailsExternalDataProps;\r\ntype PassDetailsProps = PassDetailsDataProps & PassDetailsActionProps;\r\n\r\nexport const PassDetails: React.FunctionComponent = ({\r\n pass,\r\n translate,\r\n passId,\r\n anlaeggningsId,\r\n fetchFailed,\r\n isFetching,\r\n bokningar,\r\n isDesktopMode,\r\n fetchPassDetails,\r\n getBookingsInBackground,\r\n}) => {\r\n React.useEffect(() => {\r\n if (!!passId && !!anlaeggningsId && (!pass || '' + pass.PassId !== '' + passId)) {\r\n fetchPassDetails(passId, anlaeggningsId);\r\n getBookingsInBackground();\r\n }\r\n }, [passId, anlaeggningsId, fetchPassDetails, getBookingsInBackground, pass]);\r\n\r\n if (fetchFailed) {\r\n return ;\r\n }\r\n if (isFetching || !pass) {\r\n return ;\r\n }\r\n return (\r\n
\r\n \r\n {isDesktopMode && }\r\n \r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { getCurrencyCode } from 'utils';\r\nimport { IconCross, IconCrossColor } from 'components/icons';\r\n\r\nexport interface ShoppingBasketProductDataProps {\r\n item: fos.api.SubscriptionItem;\r\n product: fos.api.Product;\r\n}\r\n\r\nexport interface ShoppingBasketProductActionProps {\r\n delete: () => void;\r\n}\r\n\r\ntype ShoppingBasketProductProps = ShoppingBasketProductDataProps & ShoppingBasketProductActionProps;\r\n\r\nexport const ShoppingBasketProduct: React.SFC = (props: ShoppingBasketProductProps) => {\r\n const getFormatedPrice = (): string => {\r\n if (!props.item.price) {\r\n return '';\r\n }\r\n let amount = props.item.price.amount;\r\n if (!!props.item.coupon) {\r\n amount += props.item.coupon.discount.amount;\r\n }\r\n amount /= 100;\r\n return amount.toString() + getCurrencyCode(props.item.price.currency);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n

{props.product.Namn}

\r\n
\r\n
\r\n \r\n {getFormatedPrice()}\r\n {props.product.PaymentMethod === 'AutoGiro' && /mån}\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { getCurrencyCode } from 'utils';\r\nimport { IconCross, IconCrossColor } from 'components/icons';\r\n\r\nexport interface ShoppingBasketCouponDataProps {\r\n coupon: fos.api.Coupon;\r\n}\r\n\r\nexport interface ShoppingBasketCouponActionProps {\r\n delete: () => void;\r\n}\r\n\r\ntype ShoppingBasketCouponProps = ShoppingBasketCouponDataProps & ShoppingBasketCouponActionProps;\r\n\r\nexport const ShoppingBasketCoupon: React.SFC = (props: ShoppingBasketCouponProps) => {\r\n const getFormattedCouponAmount = (): string => {\r\n const amount = props.coupon.discount.amount / 100;\r\n return '-' + amount.toString() + getCurrencyCode(props.coupon.discount.currency);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n

{props.coupon.name}

\r\n
\r\n
\r\n {getFormattedCouponAmount()}\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { getCurrencyCode } from 'utils';\r\n\r\nexport interface ShoppingBasketTotalPriceProps {\r\n title: string;\r\n amount: number;\r\n currency: string;\r\n}\r\n\r\nexport const ShoppingBasketTotalPrice: React.SFC = (\r\n props: ShoppingBasketTotalPriceProps\r\n) => {\r\n return (\r\n
\r\n
\r\n

{props.title}

\r\n
\r\n
\r\n \r\n {props.amount}\r\n {getCurrencyCode(props.currency)}\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { ShoppingBasketProduct } from '../shoppingBasketProduct';\r\nimport { ShoppingBasketCoupon } from '../shoppingBasketCoupon';\r\nimport { ShoppingBasketTotalPrice } from '../shoppingBasketTotalPrice';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { StatusBar } from 'components/common';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ShoppingBasketProductsListInternalProps {\r\n order?: fos.api.Order;\r\n showMessage?: boolean;\r\n}\r\n\r\nexport interface ShoppingBasketProductsListExternalProps {\r\n productList: fos.api.Product[];\r\n translate: TranslateFunction;\r\n activeFoerening?: number;\r\n isAdmin: boolean;\r\n}\r\n\r\nexport type ShoppingBasketProductsListDataProps = ShoppingBasketProductsListInternalProps &\r\n ShoppingBasketProductsListExternalProps;\r\n\r\nexport interface ShoppingBasketProductsListActionProps {\r\n deleteCoupon: (coupon: fos.api.Coupon, orderId: number, foereningId: number) => void;\r\n deleteSubscription: (productId: number, orderId: number, foereningId: number) => void;\r\n showMembershipMessage: (showMessage: boolean) => void;\r\n}\r\nexport interface ShoppingBasketProductsListState {}\r\n\r\ntype ShoppingBasketProductsListProps = ShoppingBasketProductsListDataProps & ShoppingBasketProductsListActionProps;\r\n\r\nexport class ShoppingBasketProductsList extends React.Component<\r\n ShoppingBasketProductsListProps,\r\n ShoppingBasketProductsListState\r\n> {\r\n render() {\r\n return (\r\n
\r\n this.props.showMembershipMessage(false)}\r\n />\r\n
    \r\n {!!this.props.order &&\r\n this.props.productList.length > 0 &&\r\n !!this.props.order.subscriptionItems &&\r\n this.props.order.subscriptionItems.filter(i => !!i).map((item, index) => this.renderProduct(item, index))}\r\n {(!this.props.order ||\r\n !this.props.order.subscriptionItems ||\r\n this.props.order.subscriptionItems.length === 0) && (\r\n
  • \r\n {this.props.translate(SitecoreDictionary.Cart.EmptyCart)}\r\n
  • \r\n )}\r\n
\r\n\r\n {!!this.props.order &&\r\n !!this.props.order.subscriptionItems &&\r\n this.props.order.subscriptionItems.length > 0 && (\r\n s.price.amount).reduce((p, c) => p + c) / 100}\r\n currency={this.props.order.subscriptionItems[0].price.currency}\r\n />\r\n )}\r\n
\r\n );\r\n }\r\n\r\n renderProduct = (item: fos.api.SubscriptionItem, index: number) => {\r\n const product = this.props.productList.find(p => '' + p.Id === '' + item.product.id);\r\n if (!product && !this.props.isAdmin) {\r\n throw new Error('Product ' + item.product.id + ' does not exist');\r\n }\r\n return (\r\n \r\n
  • \r\n {!!product && (\r\n {\r\n if (!!this.props.activeFoerening && !!this.props.order) {\r\n // this.props.deleteProduct(this.props.anlaeggningId, this.props.productList.find(p => '' + p.Id === '' + item.product.id)!, this.props.activeFoerening);\r\n this.props.deleteSubscription(item.product.id, this.props.order.id, this.props.activeFoerening);\r\n }\r\n }}\r\n />\r\n )}\r\n {!product && (\r\n
    \r\n {(this.props.translate(SitecoreDictionary.Shop.Admin.ProductNotFound) as string)\r\n .replace('{name}', item.product.name)\r\n .replace('{id}', item.product.id.toString())}\r\n
    \r\n )}\r\n
  • \r\n {!!item.coupon && (\r\n
  • \r\n {\r\n if (!!this.props.activeFoerening && !!this.props.order) {\r\n this.props.deleteCoupon(item.coupon, this.props.order.id, this.props.activeFoerening);\r\n }\r\n }}\r\n />\r\n
  • \r\n )}\r\n
    \r\n );\r\n };\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n ShoppingBasketProductsListExternalProps,\r\n ShoppingBasketProductsListActionProps,\r\n ShoppingBasketProductsList,\r\n ShoppingBasketProductsListDataProps,\r\n} from './shoppingBasketProductsList';\r\nimport { removeCoupon, removeSubscription } from '../../shop/Order/Order';\r\nimport { showMembershipMessage } from 'store/basket';\r\n\r\nconst mapStateToProps = (\r\n state: RootState,\r\n props: ShoppingBasketProductsListExternalProps\r\n): ShoppingBasketProductsListDataProps => {\r\n return {\r\n order: state.shoppingBasket.order,\r\n showMessage: state.shoppingBasket.showMembershipMessage,\r\n productList: props.productList,\r\n translate: props.translate,\r\n activeFoerening: props.activeFoerening,\r\n isAdmin: props.isAdmin,\r\n };\r\n};\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): ShoppingBasketProductsListActionProps => ({\r\n deleteCoupon: (coupon: fos.api.Coupon, orderId: number, foereningId: number) =>\r\n removeCoupon(foereningId, orderId, coupon.name),\r\n deleteSubscription: (productId: number, orderId: number, foereningId: number) =>\r\n removeSubscription(foereningId, orderId, productId),\r\n showMembershipMessage: (showMessage: boolean) => dispatch(showMembershipMessage(showMessage)),\r\n});\r\n\r\nexport const ShoppingBasketProductsListContainer = connect(\r\n mapStateToProps,\r\n mapActionsToProps\r\n)(ShoppingBasketProductsList);\r\n","import * as React from 'react';\r\n\r\ninterface FormContainerProps {\r\n className?: string;\r\n title?: string;\r\n children?: JSX.Element | JSX.Element[];\r\n}\r\n\r\nexport const FormContainer: React.SFC = (props: FormContainerProps) => (\r\n
    {props.children}
    \r\n);\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Overlay } from 'components/common';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface MedlemsVillkorDataProps {\r\n activeFoerening?: FoereningInternal;\r\n medlemsVillkor?: string;\r\n readonly translate: TranslateFunction;\r\n medlemsVillkorNotFound: boolean;\r\n isFetching: boolean;\r\n isFetched: boolean;\r\n}\r\n\r\nexport interface MedlemsVillkorActionProps {\r\n getMedlemsVillkor: (foereningNamn: string, foereningId: number) => void;\r\n}\r\n\r\nexport interface MedlemsVillkorPassedProps {\r\n isDesktopMode: boolean;\r\n close: () => void;\r\n}\r\n\r\nexport type MedlemsVillkorProps = MedlemsVillkorActionProps & MedlemsVillkorDataProps & MedlemsVillkorPassedProps;\r\n\r\nexport class MedlemsVillkor extends React.Component {\r\n\r\n componentDidMount() {\r\n if (!this.props.isFetching && !this.props.isFetched && this.props.activeFoerening) {\r\n this.props.getMedlemsVillkor(this.props.activeFoerening.Namn, this.props.activeFoerening.Id);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: MedlemsVillkorProps) {\r\n if (!newProps.isFetching && !newProps.isFetched && newProps.activeFoerening) {\r\n newProps.getMedlemsVillkor(newProps.activeFoerening.Namn, newProps.activeFoerening.Id);\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
    \r\n {this.props.medlemsVillkor && !this.props.medlemsVillkorNotFound ? (\r\n \r\n ) : this.props.medlemsVillkorNotFound ? (\r\n
    \r\n {this.props.translate(SitecoreDictionary.MedlemsVillkor.HasNoMedlemsVillkor)}\r\n
    \r\n ) : (\r\n
    \r\n )}\r\n {!this.props.isDesktopMode && (\r\n \r\n )}\r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport {\r\n MedlemsVillkor,\r\n MedlemsVillkorActionProps,\r\n MedlemsVillkorDataProps,\r\n MedlemsVillkorPassedProps,\r\n} from './MedlemsVillkor';\r\nimport { getMedlemsVillkor } from 'store/foereningar';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { getHasLoadFailed, FetchStatusAggregateTypes, getIsFetching, getIsFetched } from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState, props: MedlemsVillkorPassedProps): MedlemsVillkorDataProps => {\r\n const foereningId = state.global.session.shopFoerening\r\n ? state.global.session.shopFoerening\r\n : state.global.session.activeFoerening;\r\n const activeFoerening = getActiveFoerening(state.foereningar.read.Foereningar, foereningId);\r\n const medlemsVillkor = getVillkor(state.foereningar.read.Foereningar, foereningId);\r\n return {\r\n activeFoerening,\r\n medlemsVillkor,\r\n translate: getTranslate(state.locale),\r\n medlemsVillkorNotFound:\r\n !!activeFoerening &&\r\n getHasLoadFailed(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.MEDLEM_VILLKOR) &&\r\n !medlemsVillkor,\r\n isFetching:\r\n !!activeFoerening &&\r\n getIsFetching(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.MEDLEM_VILLKOR),\r\n isFetched:\r\n !!activeFoerening &&\r\n (getIsFetched(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.MEDLEM_VILLKOR) ||\r\n getHasLoadFailed(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.MEDLEM_VILLKOR)),\r\n };\r\n};\r\n\r\nconst getActiveFoerening = (foereningar: FoereningInternal[], foereningId?: number): FoereningInternal | undefined => {\r\n if (!foereningId) {\r\n return;\r\n }\r\n return foereningar.find(f => f.Id.toString() === foereningId.toString());\r\n};\r\n\r\nconst getVillkor = (foereningar: FoereningInternal[], foereningId?: number): string | undefined => {\r\n const foerening = getActiveFoerening(foereningar, foereningId);\r\n\r\n return foerening ? foerening.MedlemsVillkor : undefined;\r\n};\r\n\r\nconst mapDispatchToProps: MedlemsVillkorActionProps = {\r\n getMedlemsVillkor,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(MedlemsVillkor);\r\n","import * as React from 'react';\r\nimport { Checkbox } from 'components/common';\r\nimport { MedlemsVillkor } from './medlemsVillkor';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface TermsCheckboxDataProps {\r\n isChecked?: boolean;\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface TermsCheckboxActionProps {\r\n onValueChange: (newValue: boolean) => void;\r\n}\r\n\r\ninterface TermsCheckboxState {\r\n isMedlemsVillkorOpened?: boolean;\r\n}\r\n\r\ntype TermsCheckboxProps = TermsCheckboxActionProps & TermsCheckboxDataProps;\r\n\r\nexport class TermsCheckbox extends React.Component {\r\n constructor(props: TermsCheckboxProps) {\r\n super(props);\r\n this.state = {};\r\n this.toogleMedlemskapVillkor = this.toogleMedlemskapVillkor.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n {this.state.isMedlemsVillkorOpened && (\r\n \r\n )}\r\n

    {this.props.translate(SitecoreDictionary.Cart.TermsCheckboxTitle)}

    \r\n this.props.onValueChange(newVal)}\r\n >\r\n \r\n {this.props.translate(SitecoreDictionary.Cart.IAccept)}\r\n  \r\n \r\n \r\n
    \r\n {this.props.translate(SitecoreDictionary.Cart.TheTerms)}\r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n private toogleMedlemskapVillkor() {\r\n this.setState({\r\n isMedlemsVillkorOpened: !this.state.isMedlemsVillkorOpened,\r\n });\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\ninterface PaymentPurchaseFailMessageProps {\r\n msg: string;\r\n}\r\n\r\nexport const PaymentPurchaseFailMessage: React.SFC = (\r\n props: PaymentPurchaseFailMessageProps\r\n) => {\r\n const scrollIntoView = (ref: HTMLDivElement | null) => {\r\n if (ref) {\r\n ref.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'start',\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
    scrollIntoView(ref)}>\r\n

    {props.msg}

    \r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Overlay } from 'components/common';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface SmsEmailVillkorDataProps {\r\n activeFoerening?: FoereningInternal;\r\n smsEmailVillkor?: string;\r\n readonly translate: TranslateFunction;\r\n smsEmailVillkorNotFound: boolean;\r\n isFetching: boolean;\r\n isFetched: boolean;\r\n}\r\n\r\nexport interface SmsEmailVillkorActionProps {\r\n getSmsEmailVillkor: (foereningNamn: string, foereningId: number) => void;\r\n}\r\n\r\nexport interface SmsEmailVillkorPassedProps {\r\n isDesktopMode: boolean;\r\n close: () => void;\r\n}\r\n\r\nexport type SmsEmailVillkorProps = SmsEmailVillkorActionProps & SmsEmailVillkorDataProps & SmsEmailVillkorPassedProps;\r\n\r\nexport class SmsEmailVillkor extends React.Component {\r\n\r\n componentDidMount() {\r\n if (!this.props.isFetching && !this.props.isFetched && this.props.activeFoerening) {\r\n this.props.getSmsEmailVillkor(this.props.activeFoerening.Namn, this.props.activeFoerening.Id);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: SmsEmailVillkorProps) {\r\n if (!newProps.isFetching && !newProps.isFetched && newProps.activeFoerening) {\r\n newProps.getSmsEmailVillkor(newProps.activeFoerening.Namn, newProps.activeFoerening.Id);\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
    \r\n {this.props.smsEmailVillkor && !this.props.smsEmailVillkorNotFound ? (\r\n \r\n ) : this.props.smsEmailVillkorNotFound ? (\r\n
    \r\n {this.props.translate(SitecoreDictionary.MedlemsVillkor.HasNoSmsEmailVillkor)}\r\n
    \r\n ) : (\r\n
    \r\n )}\r\n {!this.props.isDesktopMode && (\r\n \r\n )}\r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Checkbox } from 'components/common';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nimport { PopupGDPR } from './PopupGDPR';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface TermsCheckboxDataProps {\r\n isChecked?: boolean;\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface TermsCheckboxActionProps {\r\n onValueChange: (newValue: boolean) => void;\r\n}\r\n\r\ninterface TermsCheckboxState {\r\n isGdprVillkorOpened?: boolean;\r\n}\r\n\r\ntype TermsCheckboxProps = TermsCheckboxActionProps & TermsCheckboxDataProps;\r\n\r\nexport class TermsCheckboxGDPR extends React.Component {\r\n constructor(props: TermsCheckboxProps) {\r\n super(props);\r\n this.state = {};\r\n this.toggleGdprVillkor = this.toggleGdprVillkor.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n {this.state.isGdprVillkorOpened && (\r\n \r\n )}\r\n

    {this.props.translate(SitecoreDictionary.GDPR.TermsCheckBoxTitleGDPR)}

    \r\n\r\n this.props.onValueChange(newVal)}\r\n >\r\n \r\n {this.props.translate(SitecoreDictionary.Cart.IAccept)}\r\n  \r\n \r\n \r\n
    \r\n {this.props.translate(SitecoreDictionary.Cart.TheTerms)}\r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n private toggleGdprVillkor() {\r\n this.setState({\r\n isGdprVillkorOpened: !this.state.isGdprVillkorOpened,\r\n });\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport {\r\n SmsEmailVillkor,\r\n SmsEmailVillkorActionProps,\r\n SmsEmailVillkorDataProps,\r\n SmsEmailVillkorPassedProps,\r\n} from './SmsEmailVillkor';\r\nimport { getSmsEmailVillkor } from 'store/foereningar';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { getHasLoadFailed, FetchStatusAggregateTypes, getIsFetching, getIsFetched } from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState, props: SmsEmailVillkorPassedProps): SmsEmailVillkorDataProps => {\r\n const foereningId = state.global.session.shopFoerening\r\n ? state.global.session.shopFoerening\r\n : state.global.session.activeFoerening;\r\n const activeFoerening = getActiveFoerening(state.foereningar.read.Foereningar, foereningId);\r\n const smsEmailVillkor = getVillkor(state.foereningar.read.Foereningar, foereningId);\r\n return {\r\n activeFoerening,\r\n smsEmailVillkor,\r\n translate: getTranslate(state.locale),\r\n smsEmailVillkorNotFound:\r\n !!activeFoerening &&\r\n getHasLoadFailed(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR) &&\r\n !smsEmailVillkor,\r\n isFetching:\r\n !!activeFoerening &&\r\n getIsFetching(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR),\r\n isFetched:\r\n !!activeFoerening &&\r\n (getIsFetched(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR) ||\r\n getHasLoadFailed(state.global.fetch, activeFoerening.Id, FetchStatusAggregateTypes.SMS_EMAIL_VILLKOR)),\r\n };\r\n};\r\n\r\nconst getActiveFoerening = (foereningar: FoereningInternal[], foereningId?: number): FoereningInternal | undefined => {\r\n if (!foereningId) {\r\n return;\r\n }\r\n return foereningar.find(f => f.Id.toString() === foereningId.toString());\r\n};\r\n\r\nconst getVillkor = (foereningar: FoereningInternal[], foereningId?: number): string | undefined => {\r\n const foerening = getActiveFoerening(foereningar, foereningId);\r\n\r\n return foerening ? foerening.SmsEmailVillkor : undefined;\r\n};\r\n\r\nconst mapDispatchToProps: SmsEmailVillkorActionProps = {\r\n getSmsEmailVillkor,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(SmsEmailVillkor);\r\n","import * as React from 'react';\r\nimport { Checkbox } from 'components/common';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nimport { SmsEmailVillkor } from './smsEmailVillkor';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface TermsCheckboxDataProps {\r\n isChecked?: boolean;\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface TermsCheckboxActionProps {\r\n onValueChange: (newValue: boolean) => void;\r\n}\r\n\r\ninterface TermsCheckboxState {\r\n isSmsEmailVillkorOpened?: boolean;\r\n}\r\n\r\ntype TermsCheckboxProps = TermsCheckboxActionProps & TermsCheckboxDataProps;\r\n\r\nexport class TermsCheckboxSmsEmail extends React.Component {\r\n constructor(props: TermsCheckboxProps) {\r\n super(props);\r\n this.state = {};\r\n this.toggleSmsEmailVillkor = this.toggleSmsEmailVillkor.bind(this);\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n {this.state.isSmsEmailVillkorOpened && (\r\n \r\n )}\r\n

    {this.props.translate(SitecoreDictionary.GDPR.TermsCheckBoxTitleGDPR)}

    \r\n\r\n this.props.onValueChange(newVal)}\r\n >\r\n \r\n {this.props.translate(SitecoreDictionary.Cart.IAccept)}\r\n  \r\n \r\n \r\n
    \r\n {this.props.translate(SitecoreDictionary.Cart.TheTerms)}\r\n
    \r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n private toggleSmsEmailVillkor() {\r\n this.setState({\r\n isSmsEmailVillkorOpened: !this.state.isSmsEmailVillkorOpened,\r\n });\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainInput, MainButton, AutogiroInput, StatusBar, SelectInput, Spinner } from 'components/common';\r\nimport { FormContainer } from '../formContainer';\r\nimport { TermsCheckbox } from '../TermsCheckbox';\r\nimport { PaymentPurchaseFailMessage } from '..';\r\n\r\nimport { SitecoreDictionary, PaymentMethodType } from 'models';\r\nimport { addCoupon } from 'components/shop/Order/Order';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { SelectInputOption } from 'components/common/SelectInput';\r\n\r\nexport interface KnownUserBuyingFormInternalDataProps {\r\n isClearingNumberValid?: boolean;\r\n isAccountNumberValid?: boolean;\r\n clearingNumberValue: string;\r\n accountNumberValue: string;\r\n phoneNumber?: string;\r\n shouldShowCouponMessage?: boolean;\r\n getPaymentMethodsStatus?: EntityStatus;\r\n paymentMethods?: fos.api.PaymentMethod[];\r\n errorOnPurchase?: string;\r\n errorsOnCreatePayment?: string[];\r\n disableSubmit: boolean;\r\n shouldShowAutogiroInfo: boolean;\r\n orderId: number;\r\n}\r\nexport interface KnownUserBuyingFormExternalDataProps {\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n foereningId?: number;\r\n isAuthenticated: boolean;\r\n isAdmin: boolean;\r\n}\r\n\r\nexport type KnownUserBuyingFormDataProps = KnownUserBuyingFormExternalDataProps & KnownUserBuyingFormInternalDataProps;\r\n\r\nexport interface KnownUserBuyingFormActionProps {\r\n buy: () => void;\r\n onClearingNumberChange: (newValue: string) => void;\r\n onAccountNumberChange: (newValue: string) => void;\r\n showCouponMessage: (showMessage: boolean) => void;\r\n getPaymentMethods: (foereningId: number, orderId: number) => void;\r\n updatePaymentMethod: (paymentMethodId: number) => void;\r\n updatePhoneNumber: (phoneNumber: string) => void;\r\n clearCreatePaymentErrors: () => void;\r\n clearPurchaseErrors: () => void;\r\n setSiteSwitcherToVisible: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n}\r\n\r\ninterface KnownUserBuyingFormState {\r\n termsAccepted: boolean;\r\n code: string;\r\n paymentMethodId?: number;\r\n}\r\n\r\nconst initialState: KnownUserBuyingFormState = {\r\n termsAccepted: false,\r\n code: '',\r\n};\r\n\r\ntype KnownUserBuyingFormProps = KnownUserBuyingFormActionProps & KnownUserBuyingFormDataProps;\r\n\r\nexport class KnownUserBuyingForm extends React.Component {\r\n constructor(props: KnownUserBuyingFormProps) {\r\n super(props);\r\n this.state = initialState;\r\n this.props.showCouponMessage(false);\r\n }\r\n\r\n componentDidUpdate(prevProps: KnownUserBuyingFormProps) {\r\n if (!!this.props.foereningId && !!this.props.orderId) {\r\n if (!this.props.getPaymentMethodsStatus || this.props.getPaymentMethodsStatus === EntityStatus.INITIAL) {\r\n this.props.getPaymentMethods(this.props.foereningId, this.props.orderId);\r\n }\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n if (!!this.props.foereningId && !!this.props.orderId) {\r\n if (!this.props.getPaymentMethodsStatus || this.props.getPaymentMethodsStatus === EntityStatus.INITIAL) {\r\n this.props.getPaymentMethods(this.props.foereningId, this.props.orderId);\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n if (this.props.getPaymentMethodsStatus !== EntityStatus.SUCCESS) {\r\n return ;\r\n }\r\n return (\r\n \r\n
    this.submit(event)}>\r\n {\r\n /* KAMPANJ */\r\n\r\n \r\n

    \r\n {this.props.translate(SitecoreDictionary.Cart.CouponCodeTitle)}\r\n

    \r\n
    \r\n this.setCampaignCode(value as string)}\r\n autocomplete=\"off\"\r\n />\r\n this.handleCampaignChange(this.state.code)}\r\n title={this.props.translate(SitecoreDictionary.Cart.CouponCodeButtonText) as string}\r\n />\r\n
    \r\n this.props.showCouponMessage(false)}\r\n />\r\n
    \r\n }\r\n {\r\n /* AUTOGIRO */\r\n this.props.shouldShowAutogiroInfo && this.props.isAuthenticated && (\r\n
    \r\n \r\n
    \r\n )\r\n }\r\n {\r\n /* BETALSÄTT */\r\n this.props.getPaymentMethodsStatus === EntityStatus.SUCCESS && this.props.isAuthenticated && (\r\n
    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Cart.PaymentMethodsTitle)}\r\n

    \r\n {this.props.shouldShowAutogiroInfo && (\r\n

    {this.props.translate(SitecoreDictionary.Cart.PaymentMethodsAutogiroExtraInfo)}

    \r\n )}\r\n 0}\r\n options={this.mapPaymentMethods()}\r\n onValueChange={value => this.onChange(parseInt(value, 10))}\r\n theme=\"\"\r\n disabled={false}\r\n tabindex={0}\r\n />\r\n {this.getExtraInfo()}\r\n
    \r\n )\r\n }\r\n {this.props.errorOnPurchase && this.props.isAuthenticated && (\r\n \r\n )}\r\n {this.props.isAuthenticated && (\r\n this.updateTermsAccepted(newValue as boolean)}\r\n isDesktopMode={this.props.isDesktopMode}\r\n translate={this.props.translate}\r\n />\r\n )}\r\n {\r\n if (this.props.isAuthenticated) {\r\n this.props.clearCreatePaymentErrors();\r\n this.props.buy();\r\n } else {\r\n this.props.setSiteSwitcherToVisible();\r\n }\r\n }}\r\n />\r\n {\r\n 0}\r\n closeBtn={true}\r\n handleClick={this.props.clearCreatePaymentErrors}\r\n message={\r\n !!this.props.errorsOnCreatePayment\r\n ? this.props.errorsOnCreatePayment.map((e, i) => {\r\n const message = this.props.translate(\r\n e in SitecoreDictionary.PaymentErrorMessages.CreatePaymentErrorMessages\r\n ? (SitecoreDictionary.PaymentErrorMessages.CreatePaymentErrorMessages as any)[e]\r\n : SitecoreDictionary.PaymentErrorMessages.GeneralError\r\n );\r\n\r\n return i !== this.props.errorsOnCreatePayment!.length - 1 ? (\r\n

    {message}

    \r\n ) : (\r\n message\r\n );\r\n })\r\n : ''\r\n }\r\n />\r\n }\r\n \r\n
    \r\n );\r\n }\r\n onChange = (value: number): void => {\r\n this.setState({\r\n ...this.state,\r\n paymentMethodId: value,\r\n });\r\n this.props.clearPurchaseErrors();\r\n this.props.updatePaymentMethod(value);\r\n };\r\n mapPaymentMethods = (): SelectInputOption[] => {\r\n const arr: SelectInputOption[] = [\r\n {\r\n value: -1,\r\n label: this.props.translate(SitecoreDictionary.Cart.PaymentMethodPlaceholder) as string,\r\n isDisabled: true,\r\n },\r\n ];\r\n if (!this.props.paymentMethods || this.props.paymentMethods.length === 0) {\r\n return arr;\r\n }\r\n return arr.concat(\r\n this.props.paymentMethods.map(p => {\r\n return {\r\n value: p.Id,\r\n label: this.getPaymentMethodLabel(p.type),\r\n };\r\n })\r\n );\r\n };\r\n\r\n getExtraInfo = (): JSX.Element => {\r\n const paymentMethod = this.getPaymentMethod(this.state.paymentMethodId, this.props.paymentMethods);\r\n if (paymentMethod) {\r\n switch (paymentMethod.type) {\r\n case PaymentMethodType.SWISH:\r\n return (\r\n
    \r\n this.props.updatePhoneNumber(value as string)}\r\n autocomplete=\"off\"\r\n />\r\n
    \r\n );\r\n default:\r\n return ;\r\n }\r\n } else {\r\n return ;\r\n }\r\n };\r\n\r\n getPaymentMethodLabel = (type: PaymentMethodType): string => {\r\n switch (type) {\r\n case PaymentMethodType.BANK:\r\n return this.props.translate(SitecoreDictionary.Cart.PaymentMethodBank) as string;\r\n case PaymentMethodType.CARD:\r\n return this.props.translate(SitecoreDictionary.Cart.PaymentMethodCard) as string;\r\n case PaymentMethodType.SWISH:\r\n return this.props.translate(SitecoreDictionary.Cart.PaymentMethodSwish) as string;\r\n default:\r\n return 'Okänt';\r\n }\r\n };\r\n\r\n setCampaignCode = (code: string): void => {\r\n this.setState({\r\n ...this.state,\r\n code: code,\r\n });\r\n };\r\n\r\n // Not supported right now\r\n // private updatePaymentMethod(newValue: string) {\r\n // this.setState({\r\n // ...this.state,\r\n // paymentMethod: newValue\r\n // });\r\n // }\r\n\r\n updateTermsAccepted = (newValue: boolean) => {\r\n this.setState({\r\n ...this.state,\r\n termsAccepted: newValue,\r\n });\r\n };\r\n\r\n isInputCorrectlyFormatted(value: string): boolean {\r\n var regEx = /^[0-9 ()+-]+$/;\r\n return !!value && regEx.test(value) && value.length > 8;\r\n }\r\n\r\n getPaymentMethod(paymentMethodId: number | undefined, paymentMethods: fos.api.PaymentMethod[] | undefined) {\r\n if (!paymentMethodId || !paymentMethods) {\r\n return undefined;\r\n }\r\n const paymentMethod = paymentMethods.find(p => '' + p.Id === '' + paymentMethodId);\r\n if (!paymentMethod) {\r\n return undefined;\r\n }\r\n return paymentMethod;\r\n }\r\n isPaymentMethodValid(paymentMethodId: number | undefined, paymentMethods: fos.api.PaymentMethod[] | undefined) {\r\n const paymentMethod = this.getPaymentMethod(paymentMethodId, paymentMethods);\r\n if (paymentMethod) {\r\n switch (paymentMethod.type) {\r\n case PaymentMethodType.SWISH:\r\n return this.isInputCorrectlyFormatted(this.props.phoneNumber ? this.props.phoneNumber : '');\r\n case PaymentMethodType.CARD:\r\n return true;\r\n case PaymentMethodType.BANK:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n containsOnlyNumber = (value: string) => {\r\n return /^\\d+$/.test(value);\r\n };\r\n\r\n handleCampaignChange = (code: string) => {\r\n if (!this.props.foereningId || !this.props.orderId) {\r\n return;\r\n }\r\n\r\n addCoupon(this.props.foereningId, this.props.orderId, code);\r\n };\r\n\r\n submit = (event: React.FormEvent) => {\r\n event.preventDefault();\r\n };\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n KnownUserBuyingFormExternalDataProps,\r\n KnownUserBuyingFormDataProps,\r\n KnownUserBuyingFormActionProps,\r\n KnownUserBuyingForm,\r\n} from './KnownUserBuyingForm';\r\nimport {\r\n buyBasket,\r\n updateAutoGiroClearingNumber,\r\n updateAutogiroAccountNumber,\r\n showCouponMessage,\r\n updatePaymentMethod,\r\n updatePhoneNumberAction,\r\n onCreatePaymentError,\r\n onBasketPurchaseError,\r\n} from 'store/basket';\r\nimport { getPaymentMethods } from 'store/payment';\r\nimport { SiteSwitcherAction } from 'store/global/ui/siteswitcher';\r\nimport {\r\n getEntityStatus,\r\n FetchStatusAggregateTypes,\r\n} from 'store/global/fetch';\r\nimport { SitecoreDictionary, ProductPaymentMethod } from 'models';\r\nimport { getPurchaseErrorMessage } from 'utils';\r\n\r\nconst setSiteSwitcherToVisibleFullscreen = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW_FULLSCREEN',\r\n });\r\n};\r\n\r\nconst setSiteSwitcherToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_HIDE',\r\n });\r\n};\r\n\r\nconst mapStateToProps = (\r\n state: RootState,\r\n props: KnownUserBuyingFormExternalDataProps\r\n): KnownUserBuyingFormDataProps => {\r\n const products = state.shoppingBasket.products;\r\n return {\r\n disableSubmit: products.length === 0 || props.isAdmin,\r\n isDesktopMode: props.isDesktopMode,\r\n translate: props.translate,\r\n shouldShowAutogiroInfo: !!products.find(product => product.PaymentMethod === ProductPaymentMethod.AutoGiro),\r\n foereningId: props.foereningId,\r\n isAuthenticated: props.isAuthenticated,\r\n isAdmin: props.isAdmin,\r\n\r\n orderId: state.global.session.orderId!,\r\n isClearingNumberValid: !!state.shoppingBasket.autogiro.isClearingNumberValid,\r\n isAccountNumberValid: !!state.shoppingBasket.autogiro.isAccountNumberValid,\r\n clearingNumberValue: state.shoppingBasket.autogiro.clearingNumber,\r\n accountNumberValue: state.shoppingBasket.autogiro.accountNumber,\r\n phoneNumber: state.shoppingBasket.phoneNumber,\r\n shouldShowCouponMessage: state.shoppingBasket.showCouponMessage,\r\n getPaymentMethodsStatus: !!props.foereningId\r\n ? getEntityStatus(state.global.fetch, '' + props.foereningId, FetchStatusAggregateTypes.GET_PAYMENT_METHODS)\r\n : undefined,\r\n paymentMethods: state.payment.read.paymentMethods,\r\n errorsOnCreatePayment: state.shoppingBasket.errorsOnCreatePayment,\r\n errorOnPurchase: props.isAdmin\r\n ? (props.translate(SitecoreDictionary.Shop.Admin.CannotPurchaseInAdminShop) as string)\r\n : !!state.shoppingBasket.errorOnPurchase\r\n ? getPurchaseErrorMessage(\r\n props.translate,\r\n state.shoppingBasket.errorOnPurchase,\r\n state.global.session.activeFoerening\r\n )\r\n : undefined,\r\n };\r\n};\r\nconst mapDispatchToProps = (dispatch: Dispatch): KnownUserBuyingFormActionProps => ({\r\n buy: () => dispatch(buyBasket()),\r\n onClearingNumberChange: value => dispatch(updateAutoGiroClearingNumber(value)),\r\n onAccountNumberChange: value => dispatch(updateAutogiroAccountNumber(value)),\r\n showCouponMessage: (showMessage: boolean) => dispatch(showCouponMessage(showMessage)),\r\n getPaymentMethods: (foereningId: number, orderId: number) => dispatch(getPaymentMethods(foereningId, orderId)),\r\n updatePaymentMethod: (paymentMethodId: number) => dispatch(updatePaymentMethod(paymentMethodId)),\r\n updatePhoneNumber: (phoneNumber: string) => dispatch(updatePhoneNumberAction(phoneNumber)),\r\n clearCreatePaymentErrors: () => dispatch(onCreatePaymentError([])),\r\n clearPurchaseErrors: () => dispatch(onBasketPurchaseError('')),\r\n setSiteSwitcherToVisible: () => dispatch(setSiteSwitcherToVisibleFullscreen()),\r\n setSiteSwitcherToHidden: () => dispatch(setSiteSwitcherToHidden()),\r\n});\r\n\r\nexport const KnownUserBuyingFormContainer = connect(mapStateToProps, mapDispatchToProps)(KnownUserBuyingForm);\r\n","import * as React from 'react';\r\nimport { ShoppingBasketProductsListContainer } from './shoppingBasketProducts/shoppingBasketProductsListContainer';\r\nimport { KnownUserBuyingFormContainer } from './forms/knownUserBuying';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { ErrorResult, SuccessResult } from 'websd/utils/configureApi';\r\nimport { Spinner } from '../common/Spinner';\r\nimport { routesMap, LocationActionTypes as RouteActionType } from 'store/location';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nexport interface ShoppingBasketDataProps {\r\n shopFoerening: number;\r\n allProducts: Array;\r\n isPublicWebMode: boolean;\r\n isAdmin: boolean;\r\n translate: TranslateFunction;\r\n inloggadeFoerening: number | undefined;\r\n isAuthenticated?: boolean;\r\n}\r\nexport interface ShoppingBasketInternalProps {\r\n isDesktopMode: boolean;\r\n}\r\nexport interface ShoppingBasketActionsProps {\r\n resetBuyCommand: () => void;\r\n getRegistreradeBetalningsmedel: (\r\n inloggadeFoerening: number\r\n ) => Promise>;\r\n}\r\n\r\ntype ShoppingBasketProps = ShoppingBasketDataProps & ShoppingBasketActionsProps & ShoppingBasketInternalProps;\r\nexport class ShoppingBasket extends React.Component {\r\n\r\n componentDidMount() {\r\n if (this.props.inloggadeFoerening && this.props.isAuthenticated) {\r\n this.props.getRegistreradeBetalningsmedel(this.props.inloggadeFoerening);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: ShoppingBasketProps) {\r\n if (\r\n newProps.inloggadeFoerening &&\r\n ((newProps.isAuthenticated && !this.props.isAuthenticated) ||\r\n (newProps.inloggadeFoerening !== this.props.inloggadeFoerening && newProps.isAuthenticated))\r\n ) {\r\n this.props.getRegistreradeBetalningsmedel(newProps.inloggadeFoerening);\r\n }\r\n }\r\n componentWillUnmount() {\r\n this.props.resetBuyCommand();\r\n }\r\n\r\n render() {\r\n if (!this.props.allProducts || this.props.allProducts.length === 0) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n if (!this.props.allProducts || this.props.allProducts.length === 0) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n return (\r\n
    \r\n {\r\n \r\n }\r\n {\r\n \r\n }\r\n {\r\n
    \r\n \r\n {this.props.translate(SitecoreDictionary.Common.BackToProducts) as string}\r\n \r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { ShoppingBasket, ShoppingBasketDataProps, ShoppingBasketActionsProps } from './shoppingBasket';\r\nimport { resetBuyBasketCommand } from 'store/basket';\r\nimport { getIsPublicWebMode, LocationActionTypes } from 'store/location';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getRegistreradeBetalningsmedel } from 'store/user';\r\nimport { ErrorResult, SuccessResult } from 'websd/utils/configureApi';\r\n\r\nconst mapStateToProps = (state: RootState): ShoppingBasketDataProps => {\r\n const isAuthenticated =\r\n !!state.auth.read.isAuthenticated && state.global.session.activeFoerening === state.global.session.shopFoerening;\r\n const shopFoerening = state.global.session.shopFoerening!;\r\n return {\r\n isPublicWebMode: getIsPublicWebMode(state.location),\r\n isAdmin: state.location.type === LocationActionTypes.AdminShoppingBasket,\r\n allProducts: state.product.unfilteredProducts,\r\n shopFoerening: shopFoerening,\r\n translate: getTranslate(state.locale),\r\n inloggadeFoerening: state.global.session.activeFoerening,\r\n isAuthenticated: isAuthenticated,\r\n };\r\n};\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): ShoppingBasketActionsProps => ({\r\n resetBuyCommand: () => dispatch(resetBuyBasketCommand()),\r\n getRegistreradeBetalningsmedel: foereningId =>\r\n dispatch>>(\r\n getRegistreradeBetalningsmedel(foereningId)\r\n ),\r\n});\r\n\r\nexport const ShoppingBasketContainer = connect(mapStateToProps, mapActionsToProps)(ShoppingBasket);\r\n","import * as React from 'react';\r\nimport { Overlay } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface FacilityExceptionalOpenTimesDataProps {\r\n message: string;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface FacilityExceptionalOpenTimesActionProps {\r\n close: () => void;\r\n}\r\n\r\ntype FacilityExceptionalOpenTimesProps = Readonly<\r\n FacilityExceptionalOpenTimesDataProps & FacilityExceptionalOpenTimesActionProps\r\n>;\r\n\r\nexport const FacilityExceptionalOpenTimes: React.SFC = props => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { FacilityExceptionalOpenTimes } from './FacilityExceptionalOpenTimes';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface FacilityExceptionalOpenTimesIndicatorProps {\r\n message: string;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface FacilityExceptionalOpenTimesIndicatorState {\r\n showInfoOverlay?: boolean;\r\n}\r\n\r\nexport class FacilityExceptionalOpenTimesIndicator extends React.Component<\r\n FacilityExceptionalOpenTimesIndicatorProps,\r\n FacilityExceptionalOpenTimesIndicatorState\r\n> {\r\n constructor(props: FacilityExceptionalOpenTimesIndicatorProps) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n setIsDetailsVisible(isVisible: boolean, clickEvent?: React.MouseEvent) {\r\n if (clickEvent) {\r\n clickEvent.stopPropagation();\r\n }\r\n this.setState({\r\n showInfoOverlay: isVisible,\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n this.setIsDetailsVisible(true, e)}\r\n >\r\n
    !
    \r\n
    \r\n {this.props.translate(SitecoreDictionary.Facilities.ExceptionalOpenTimes)}\r\n
    \r\n
    \r\n {this.state.showInfoOverlay && (\r\n this.setIsDetailsVisible(false)}\r\n translate={this.props.translate}\r\n />\r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { IconArrow } from 'components/icons';\r\nimport { FacilityExceptionalOpenTimesIndicator } from './FacilityExceptionalOpenTimesIndicator';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface FacilitiesItemDataProps {\r\n name: string;\r\n street: string;\r\n disabled: boolean;\r\n open: string;\r\n additionalOpen: string;\r\n close: string;\r\n additionalClose: string;\r\n receptionOpen: string;\r\n additionalReceptionOpen: string;\r\n receptionClosing: string;\r\n additionalReceptionClosing: string;\r\n openTomorrow: string;\r\n closeTomorrow: string;\r\n receptionOpenTomorrow: string;\r\n url: string;\r\n translate: TranslateFunction;\r\n exceptionalHoursEnd?: string;\r\n exceptionalHoursStart?: string;\r\n exceptionalHoursText?: string;\r\n isTargetBlank?: string;\r\n}\r\n\r\nexport default class FacilitiesItem extends React.Component> {\r\n render() {\r\n return (\r\n
    \r\n \r\n
    \r\n
    \r\n {!this.props.disabled && (\r\n \r\n )}\r\n {this.props.name}\r\n
    \r\n

    {this.props.street}

    \r\n
    \r\n
    \r\n
    \r\n {!this.props.disabled && (\r\n \r\n {this.getPrimaryText()}\r\n {\r\n
    \r\n {!!this.props.open\r\n ? this.props.open + ' - ' + this.props.close\r\n : this.props.translate(SitecoreDictionary.Facilities.Closed)}\r\n
    \r\n }\r\n {!!this.props.additionalOpen && (\r\n
    \r\n {this.props.additionalOpen} - {this.props.additionalClose}\r\n
    \r\n )}\r\n

    \r\n )}\r\n {((!!this.props.receptionOpen &&\r\n !!this.props.receptionClosing &&\r\n this.props.receptionOpen.trim() !== '' &&\r\n this.props.receptionClosing.trim() !== '') ||\r\n (!!this.props.receptionOpenTomorrow && this.props.receptionOpenTomorrow.trim() !== '')) && (\r\n \r\n {this.getSecondaryText()}\r\n {!!this.props.receptionOpen && (\r\n
    \r\n {this.props.receptionOpen} - {this.props.receptionClosing}\r\n
    \r\n )}\r\n {!!this.props.additionalReceptionOpen && (\r\n
    \r\n {this.props.additionalReceptionOpen} - {this.props.additionalReceptionClosing}\r\n
    \r\n )}\r\n

    \r\n )}\r\n
    \r\n {this.shouldShowExceptionalOpenTimes() && (\r\n \r\n )}\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private shouldShowExceptionalOpenTimes() {\r\n const haveExceptionalHours =\r\n this.props.exceptionalHoursEnd &&\r\n this.props.exceptionalHoursStart &&\r\n this.props.exceptionalHoursEnd.trim() !== '' &&\r\n this.props.exceptionalHoursEnd.trim() !== '';\r\n\r\n if (haveExceptionalHours) {\r\n const mExHoursStart = moment(this.props.exceptionalHoursStart).startOf('day');\r\n const mExHoursEnd = moment(this.props.exceptionalHoursEnd).endOf('day');\r\n if (!mExHoursEnd.isValid() || !mExHoursStart.isValid()) {\r\n return false;\r\n } else {\r\n const dateNow = moment();\r\n return dateNow.isAfter(mExHoursStart) && dateNow.isBefore(mExHoursEnd);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n private getPrimaryText() {\r\n return `${this.props.translate(SitecoreDictionary.Facilities.Open)}`;\r\n\r\n // TODO: remove this if friskis doesnt want to have the old functionality\r\n // if (this.isOpenLater(this.props.open)) {\r\n // return `${this.props.translate(SitecoreDictionary.Facilities.OpenLater)} ${this.props.open}-${this.props.close}`;\r\n // } else if (!this.isOpen(this.props.open, this.props.close)) {\r\n // if (\r\n // (\r\n // !this.props.closeTomorrow &&\r\n // !this.props.openTomorrow\r\n // ) ||\r\n // (\r\n // this.props.closeTomorrow &&\r\n // this.props.openTomorrow &&\r\n // this.props.closeTomorrow.trim() === '' &&\r\n // this.props.openTomorrow.trim() === ''\r\n // )\r\n // ) {\r\n // return this.props.translate(SitecoreDictionary.Facilities.CloseTomorrow);\r\n // }\r\n // return `${\r\n // this.props.translate(SitecoreDictionary.Facilities.OpenTomorrow)\r\n // } ${\r\n // this.props.openTomorrow\r\n // }${\r\n // this.props.openTomorrow &&\r\n // this.props.closeTomorrow &&\r\n // this.props.closeTomorrow.trim() !== '' &&\r\n // this.props.openTomorrow.trim() !== '' ?\r\n // '-' :\r\n // ''\r\n // }${\r\n // this.props.closeTomorrow\r\n // }`;\r\n // }\r\n // return `${this.props.translate(SitecoreDictionary.Facilities.Open)} ${this.props.close}`;\r\n }\r\n\r\n private getSecondaryText() {\r\n return this.props.translate(SitecoreDictionary.Facilities.OpenReception);\r\n }\r\n // TODO: remove this if friskis doesnt want to have the old functionality\r\n // if (this.isOpenLater(this.props.receptionOpen)) {\r\n // return `${this.props.translate(SitecoreDictionary.Facilities.OpenReceptionLater)} ${this.props.receptionOpen}-${this.props.receptionClosing}`;\r\n // } else if (this.isOpen(this.props.receptionOpen, this.props.receptionClosing)) {\r\n // return `${this.props.translate(SitecoreDictionary.Facilities.OpenReception)} ${this.props.receptionClosing}`;\r\n // }\r\n // if (!this.props.receptionOpenTomorrow || this.props.receptionOpenTomorrow.trim() === '') {\r\n // return '';\r\n // }\r\n // return `${this.props.translate(SitecoreDictionary.Facilities.OpenReceptionTomorrow)} ${this.props.receptionOpenTomorrow}`;\r\n\r\n private isOpen(start: string, end: string, additionalStart: string, additionalClose: string) {\r\n const currentDate = new Date();\r\n let startDate = this.convertStringToDate(start);\r\n let endDate = this.convertStringToDate(end);\r\n let additionalStartDate;\r\n let additionalCloseDate;\r\n if (!!additionalStart && !!additionalClose) {\r\n additionalStartDate = this.convertStringToDate(additionalStart);\r\n additionalCloseDate = this.convertStringToDate(additionalClose);\r\n } else {\r\n additionalStartDate = '';\r\n additionalCloseDate = '';\r\n }\r\n\r\n return (\r\n (currentDate >= startDate && currentDate < endDate) ||\r\n (currentDate >= additionalStartDate && currentDate < additionalCloseDate)\r\n );\r\n }\r\n\r\n private isOpenLater(start: string) {\r\n const currentDate = new Date();\r\n let startDate = this.convertStringToDate(start);\r\n return currentDate < startDate;\r\n }\r\n\r\n private convertStringToDate(str: string) {\r\n const currentDate = new Date();\r\n let list = str.split(':');\r\n const date = new Date(\r\n currentDate.getFullYear(),\r\n currentDate.getMonth(),\r\n currentDate.getDate(),\r\n parseInt(list[0], 10),\r\n parseInt(list[1], 10)\r\n );\r\n return date;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nimport FacilitiesItem from './FacilitiesItem';\r\nimport { Spinner } from 'components/common';\r\n\r\nexport interface FacilitiesDataProps {\r\n activeFoerning?: fos.api.InloggadeFoerening;\r\n anlaeggningar: Array;\r\n translate: TranslateFunction;\r\n isFetching: boolean;\r\n}\r\n\r\nexport interface FacilitiesActionProps {\r\n getSitecoreAnlaeggningar: (foereningName: string, foereningId: number, countryId: number) => void;\r\n}\r\n\r\nexport type FacilitiesProps = FacilitiesDataProps & FacilitiesActionProps;\r\n\r\nexport class Facilities extends React.Component {\r\n componentDidMount() {\r\n if (this.props.activeFoerning) {\r\n this.props.getSitecoreAnlaeggningar(\r\n this.props.activeFoerning.Namn,\r\n this.props.activeFoerning.Id,\r\n this.props.activeFoerning.CountryId\r\n );\r\n }\r\n }\r\n\r\n render() {\r\n if (this.props.isFetching) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n const date = new Date();\r\n const day = (date.getDay() + 6) % 7;\r\n const items = this.props.anlaeggningar.map((i, key) => (\r\n \r\n ));\r\n return
    {items}
    ;\r\n }\r\n}\r\n","import { Facilities, FacilitiesDataProps, FacilitiesActionProps } from './Facilities';\r\nimport { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { getSitecoreAnlaeggningar } from 'store/anlaeggningar';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getActiveFoerening } from 'utils';\r\nimport { getIsFetching, FetchStatusAggregateTypes } from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): FacilitiesDataProps => {\r\n const foerening = getActiveFoerening(state.global.session.inloggadeFoereningar, state.global.session.activeFoerening);\r\n return {\r\n activeFoerning: foerening,\r\n anlaeggningar: state.anlaeggningar.read.sitecoreAnlaeggningar,\r\n translate: getTranslate(state.locale),\r\n isFetching: foerening\r\n ? getIsFetching(state.global.fetch, foerening.Id, FetchStatusAggregateTypes.ANLAEGGNINGAR)\r\n : false,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): FacilitiesActionProps => ({\r\n getSitecoreAnlaeggningar: (foereningNamn: string, foereningId: number, countryId: number) =>\r\n dispatch(getSitecoreAnlaeggningar(foereningNamn, foereningId, countryId)),\r\n});\r\n\r\nexport const FacilitiesContainer = connect(mapStateToProps, mapDispatchToProps)(Facilities);\r\n","import * as React from 'react';\r\n\r\nimport { IconCheckmark } from 'components/icons';\r\n\r\ninterface ShopFilterCategoryProps {\r\n setSelectedCategoryItem: (event: React.MouseEvent, item: fos.api.FilterChoice) => void;\r\n item: fos.api.FilterChoice;\r\n giveToggleButtonSomeFocus(): void;\r\n}\r\n\r\nexport class ShopFilterCategoryItem extends React.Component {\r\n handleClick = (event: React.MouseEvent, item: fos.api.FilterChoice) => {\r\n this.props.giveToggleButtonSomeFocus();\r\n this.props.setSelectedCategoryItem(event, item);\r\n };\r\n\r\n render() {\r\n return (\r\n
    \r\n ) => this.handleClick(event, this.props.item)}\r\n >\r\n {this.props.item.Name}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FilterCategoryLocalState as ShopFilterCategoryLocalState } from 'store/global/ui/schedule-filter/uiScheduleFilterReducer';\r\nimport { ShopFilterType } from '../ShopFilter';\r\nimport { ShopFilterCategoryItem } from './category-item/ShopFilterCategoryItem';\r\n\r\nimport { UIScheduleFilterState } from 'store/global/ui/schedule-filter/uiScheduleFilterReducer';\r\nimport { UIShopFilterState } from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\nimport { ScheduleFilterCategoryName } from 'store/schedule/scheduleModels';\r\nimport { IconChevron } from 'components/icons';\r\n\r\nimport { getWeekdaysObjectMap, getDayPeriodsObjectMap, getShopFilterCategoryValuesObjectMap } from 'models';\r\nimport { ShopFilterCategoryName, FilterChoice } from 'store/shop/shopModels';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ShopFilterActionFunctions {\r\n onFilter: (value: string, category: string) => void;\r\n onSelect: (value: string, category: string) => void;\r\n onDeselect?: (value: string, category: string) => void;\r\n onClearCategoryFilters?: (category: string) => void;\r\n}\r\n\r\nexport interface ShopFilterCategoryDataProps {\r\n readonly categoryName: string;\r\n readonly internalCategoryName: ScheduleFilterCategoryName | ShopFilterCategoryName;\r\n readonly data: FilterChoice[];\r\n localState: ShopFilterCategoryLocalState;\r\n readonly filterUIState: UIScheduleFilterState | UIShopFilterState;\r\n readonly filterCategoryActionFunctions: ShopFilterActionFunctions;\r\n readonly selectedValues: string[];\r\n readonly translate: TranslateFunction;\r\n readonly listItemGroupingMapping?: { [index: string]: string | string[] };\r\n readonly isFullDesktopView: boolean;\r\n readonly isDesktopMode: boolean;\r\n readonly filterType: ShopFilterType;\r\n readonly showSearchbar: boolean;\r\n readonly children: FilterChoice[];\r\n readonly id: string;\r\n readonly selectedCategory: string;\r\n readonly categoryDescription: string;\r\n onFavoriteFilterDelete(filterId: string): void;\r\n giveToggleButtonSomeFocus(): void;\r\n setClickedCategory(id: string): void;\r\n}\r\n\r\nexport interface ShopFilterCategoryActionProps {\r\n selectAllCategoryListItems: (value: string, category: string) => void;\r\n unSelectCategoryHeader: (value: string, category: string) => void;\r\n expandCategory: (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName,\r\n filterUIState: UIScheduleFilterState | UIShopFilterState,\r\n props: ShopFilterCategoryProps\r\n ) => void;\r\n setTopPosition: (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName,\r\n filterUIState: UIScheduleFilterState | UIShopFilterState,\r\n topPosition: number,\r\n props: ShopFilterCategoryDataProps\r\n ) => void;\r\n}\r\n\r\nexport type ShopFilterCategoryProps = ShopFilterCategoryDataProps & ShopFilterCategoryActionProps;\r\n\r\nfunction getSelectedValuesForDisplay(props: ShopFilterCategoryProps) {\r\n if (!props.selectedValues) {\r\n return '';\r\n }\r\n\r\n // TODO: Investigate generalising this function so that we do not hard-code our exceptions. It has been written this way to save time.\r\n const internalCategoryName = props.internalCategoryName;\r\n switch (internalCategoryName) {\r\n case ScheduleFilterCategoryName.Veckodag: {\r\n const weekdaysMapObject = getWeekdaysObjectMap();\r\n const selectedValuesWithLocalisedNames = props.selectedValues.map(dayName => {\r\n return weekdaysMapObject[dayName];\r\n });\r\n return selectedValuesWithLocalisedNames && selectedValuesWithLocalisedNames.length\r\n ? selectedValuesWithLocalisedNames.join(', ')\r\n : '';\r\n }\r\n case ScheduleFilterCategoryName.Tidpunkt: {\r\n const dayPeriodsMapObject = getDayPeriodsObjectMap();\r\n const selectedValuesWithLocalisedNames = props.selectedValues.map(dayName => dayPeriodsMapObject[dayName]);\r\n return selectedValuesWithLocalisedNames && selectedValuesWithLocalisedNames.length\r\n ? selectedValuesWithLocalisedNames.join(', ')\r\n : '';\r\n }\r\n case ShopFilterCategoryName.ProductWho: {\r\n return getTranslatedCategoryValuesForShopFilter(props.selectedValues);\r\n }\r\n case ShopFilterCategoryName.ProductWhen: {\r\n return getTranslatedCategoryValuesForShopFilter(props.selectedValues);\r\n }\r\n case ShopFilterCategoryName.ProductHow: {\r\n return getTranslatedCategoryValuesForShopFilter(props.selectedValues);\r\n }\r\n default: {\r\n return props.selectedValues.length ? props.selectedValues.join(', ') : '';\r\n }\r\n }\r\n}\r\n\r\nfunction getTranslatedCategoryValuesForShopFilter(selectedValues: string[]): string {\r\n const translationMapping = getShopFilterCategoryValuesObjectMap();\r\n const selectedValuesWithLocalisedNames = selectedValues.map(categoryValue => {\r\n return translationMapping[categoryValue];\r\n });\r\n return selectedValuesWithLocalisedNames && selectedValuesWithLocalisedNames.length\r\n ? selectedValuesWithLocalisedNames.join(', ')\r\n : '';\r\n}\r\n\r\nfunction crop(text: string, max: number) {\r\n if (max >= text.length) {\r\n return text;\r\n }\r\n\r\n return text.substr(0, max) + '...';\r\n}\r\n\r\nexport class ShopFilterCategory extends React.Component {\r\n private instance: HTMLElement | null = null;\r\n\r\n constructor(props: ShopFilterCategoryProps) {\r\n super(props);\r\n const currentlySelectedCategoryItem = props.children.find(c => c.isSelected);\r\n\r\n this.state = {\r\n showEdit: false,\r\n atTop: false,\r\n clicked: false,\r\n topPosition: 0,\r\n selectedCategoryItem: !!currentlySelectedCategoryItem\r\n ? { id: currentlySelectedCategoryItem.SitecoreId, name: currentlySelectedCategoryItem.Name }\r\n : { id: '', name: '' },\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.instance) {\r\n let topPosition = (this.instance as HTMLElement).offsetTop;\r\n this.props.setTopPosition(this.props.internalCategoryName, this.props.filterUIState, topPosition, this.props);\r\n }\r\n }\r\n\r\n setSelectedCategoryItem = (event: React.MouseEvent, item: FilterChoice) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n for (var i = 0; i < this.props.children.length; i++) {\r\n this.props.children[i].isSelected = false;\r\n }\r\n\r\n if (item.SitecoreId === this.state.selectedCategoryItem.id) {\r\n this.setState({\r\n selectedCategoryItem: { id: '', name: '' },\r\n });\r\n } else {\r\n item.isSelected = true;\r\n\r\n this.setState({\r\n selectedCategoryItem: { id: item.SitecoreId, name: item.Name },\r\n });\r\n }\r\n this.handleClick(event, this.props.id);\r\n };\r\n\r\n handleClick = (event: React.MouseEvent, id: string) => {\r\n event.stopPropagation();\r\n this.props.setClickedCategory(id);\r\n event.nativeEvent.stopImmediatePropagation();\r\n };\r\n\r\n render() {\r\n const selectedValues = getSelectedValuesForDisplay(this.props);\r\n const hasSelectedValues = this.state.selectedCategoryItem.name;\r\n\r\n const expanded = !!this.props.selectedCategory && this.props.selectedCategory === this.props.id;\r\n\r\n let fullText = selectedValues;\r\n\r\n let fullTextExceedsMaxCharacters = fullText.length > 10;\r\n let max = fullTextExceedsMaxCharacters ? 30 : fullText.length;\r\n let croppedText = crop(fullText, max);\r\n\r\n let mappedCategories;\r\n\r\n if (this.props.children) {\r\n mappedCategories = this.props.children.map(category => (\r\n \r\n ));\r\n }\r\n\r\n return (\r\n (this.instance = node)}\r\n className={\r\n 'FilterCategoryContainer' +\r\n (expanded ? ' FilterCategoryContainer--expanded' : '') +\r\n (hasSelectedValues ? ' FilterCategoryContainer--CategorySelected' : '')\r\n }\r\n >\r\n
    \r\n ) => this.handleClick(event, this.props.id)}\r\n className={'Category__Title ' + (hasSelectedValues ? 'Category__Title--hasValues' : '')}\r\n >\r\n {this.props.categoryName}\r\n {!expanded && hasSelectedValues && (\r\n {this.state.selectedCategoryItem.name}\r\n )}\r\n \r\n
    \r\n
    \r\n {this.props.categoryDescription}\r\n\r\n
    {croppedText}
    \r\n
    \r\n
    {mappedCategories}
    \r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport enum Tab {\r\n Local,\r\n TwoBusinessUnits,\r\n National,\r\n}\r\n\r\nexport interface TabsProps {\r\n setSelectedTab: (id: Tab) => void;\r\n selectedTab: Tab;\r\n tabs: Tab[];\r\n translate: TranslateFunction;\r\n foereningNamn: string;\r\n}\r\n\r\nexport class Tabs extends React.Component {\r\n render() {\r\n const tabTitles: Map = new Map([\r\n [Tab.Local, this.props.foereningNamn],\r\n [Tab.TwoBusinessUnits, this.props.translate(SitecoreDictionary.Shop.TwoBusinessUnitCard) as string],\r\n [Tab.National, this.props.translate(SitecoreDictionary.Shop.NationalCard) as string],\r\n ]);\r\n return (\r\n this.props.tabs.length > 0 && (\r\n
    \r\n
    {this.props.translate(SitecoreDictionary.Shop.TrainingCardTabsTitle)}
    \r\n
    \r\n {this.props.tabs.map(item => (\r\n this.props.setSelectedTab(item)}\r\n >\r\n {tabTitles.get(item)}\r\n
    \r\n ))}\r\n
    \r\n \r\n )\r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport {\r\n ShopFilterCategory,\r\n ShopFilterCategoryDataProps,\r\n ShopFilterCategoryActionProps,\r\n ShopFilterCategoryProps,\r\n} from './ShopFilterCategory';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n UIScheduleFilterAction,\r\n // , UIScheduleFilterActionType\r\n} from 'store/global/ui/schedule-filter/';\r\nimport {\r\n getCategoryLocalState as getScheduleCategoryLocalState,\r\n UIScheduleFilterState,\r\n} from 'store/global/ui/schedule-filter/uiScheduleFilterReducer';\r\nimport { UIScheduleFilterActionType } from 'store/global/ui/schedule-filter/uiScheduleFilterActions';\r\nimport { ScheduleFilterCategoryName } from 'store/schedule/scheduleModels';\r\nimport { ShopFilterType } from '../ShopFilter';\r\n\r\nimport { UIShopFilterActionType, UIShopFilterAction } from 'store/global/ui/shop-filter/';\r\nimport { ShopFilterCategoryName } from 'store/shop/shopModels';\r\nimport {\r\n getCategoryLocalState as getShopCategoryLocalState,\r\n UIShopFilterState,\r\n} from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\n\r\nconst setTopPosition = (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName | string,\r\n scheduleFilterUIState: UIScheduleFilterState | UIShopFilterState,\r\n topPosition: number,\r\n props: ShopFilterCategoryDataProps\r\n) => (dispatch: Dispatch) => {\r\n if (props.filterType === ShopFilterType.Schedule) {\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetCategoryTopPosition,\r\n category: categoryName as ScheduleFilterCategoryName,\r\n topPosition: topPosition,\r\n });\r\n }\r\n if (props.filterType === ShopFilterType.Shop) {\r\n dispatch({\r\n type: UIShopFilterActionType.SetCategoryTopPosition,\r\n category: categoryName as ShopFilterCategoryName,\r\n topPosition: topPosition,\r\n });\r\n }\r\n};\r\n\r\nconst expandCategory = (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName | string,\r\n filterUIState: UIScheduleFilterState | UIShopFilterState,\r\n props: ShopFilterCategoryProps\r\n) => (dispatch: Dispatch) => {\r\n if (props.filterType === ShopFilterType.Schedule) {\r\n const categoryState = getScheduleCategoryLocalState(\r\n filterUIState as UIScheduleFilterState,\r\n categoryName as ScheduleFilterCategoryName\r\n );\r\n dispatch({\r\n type: UIScheduleFilterActionType.ToggleCategoryClicked,\r\n category: categoryName as ScheduleFilterCategoryName,\r\n clicked: categoryState.clicked,\r\n });\r\n\r\n if (categoryState.atTop) {\r\n setTimeout(function() {\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetCategoryAtNotTop,\r\n category: categoryName as ScheduleFilterCategoryName,\r\n });\r\n }, 600);\r\n } else {\r\n setTimeout(function() {\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetCategoryAtTop,\r\n category: categoryName as ScheduleFilterCategoryName,\r\n });\r\n }, 300);\r\n }\r\n }\r\n if (props.filterType === ShopFilterType.Shop) {\r\n const categoryState = getShopCategoryLocalState(\r\n filterUIState as UIShopFilterState,\r\n categoryName as ShopFilterCategoryName\r\n );\r\n dispatch({\r\n type: UIShopFilterActionType.ToggleCategoryClicked,\r\n category: categoryName as ShopFilterCategoryName,\r\n clicked: categoryState.clicked,\r\n });\r\n\r\n if (categoryState.atTop) {\r\n dispatch({\r\n type: UIShopFilterActionType.SetCategoryAtNotTop,\r\n category: categoryName as ShopFilterCategoryName,\r\n });\r\n } else {\r\n dispatch({\r\n type: UIShopFilterActionType.SetCategoryAtTop,\r\n category: categoryName as ShopFilterCategoryName,\r\n });\r\n }\r\n }\r\n};\r\nconst mapState = (state: RootState, props: any): ShopFilterCategoryDataProps => {\r\n return {\r\n categoryName: props.categoryName,\r\n data: props.data,\r\n internalCategoryName: props.internalCategoryName,\r\n localState: props.localState, // TODO: Map to proper field.\r\n filterUIState: props.filterUIState,\r\n onFavoriteFilterDelete: props.onFavoriteFilterDelete,\r\n filterCategoryActionFunctions: props.filterCategoryActionFunctions,\r\n selectedValues: props.selectedValues,\r\n translate: props.translate,\r\n listItemGroupingMapping: props.listItemGroupingMapping,\r\n isFullDesktopView: props.isFullDesktopView,\r\n isDesktopMode: props.isDesktopMode,\r\n filterType: props.filterType,\r\n showSearchbar: props.showSearchbar,\r\n children: props.children,\r\n id: props.id,\r\n selectedCategory: props.selectedCategory,\r\n setClickedCategory: props.setClickedCategory,\r\n giveToggleButtonSomeFocus: props.giveToggleButtonSomeFocus,\r\n categoryDescription: props.categoryDescription,\r\n };\r\n};\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: any): ShopFilterCategoryActionProps => ({\r\n expandCategory: (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName | string,\r\n filterUIState: UIScheduleFilterState | UIShopFilterState,\r\n filterCategoryProps: ShopFilterCategoryProps\r\n ) => dispatch(expandCategory(categoryName, filterUIState, filterCategoryProps)),\r\n setTopPosition: (\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName | string,\r\n scheduleFilterUIState: UIScheduleFilterState | UIShopFilterState,\r\n topPosition: number,\r\n filterCategoryDataProps: ShopFilterCategoryDataProps\r\n ) => dispatch(setTopPosition(categoryName, scheduleFilterUIState, topPosition, filterCategoryDataProps)),\r\n selectAllCategoryListItems: props.selectAllCategoryListItems,\r\n unSelectCategoryHeader: props.unSelectCategoryHeader,\r\n});\r\n\r\nexport default connect(mapState, mapDispatchToProps)(ShopFilterCategory);\r\n","import * as React from 'react';\r\nimport ShopFilterCategoryContainer from './filter-category/ShopFilterCategoryContainer';\r\nimport { ShopFilterActionFunctions } from './filter-category';\r\nimport { ScheduleFilterCategoryName } from 'store/schedule/scheduleModels';\r\nimport { UIScheduleFilterState } from 'store/global/ui/schedule-filter/uiScheduleFilterReducer';\r\nimport { ScheduleFilter } from 'store/schedule/scheduleModels';\r\nimport { ShopFilterCategoryListItemDataPropertyKeys } from './filter-category/filter-category-list/filter-category-list-item/ShopFilterCategoryListItem';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { ShopFilterCategoryName, FilterCategory, FilterChoice } from 'store/shop/shopModels';\r\nimport { UIShopFilterState } from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\nimport { filterUtils } from 'utils/filter';\r\nimport { Spinner } from '../Spinner';\r\nimport { Tab } from 'components/shop/Tabs/Tabs';\r\nimport { BackButton } from '../../header/HeaderContent/BackButton';\r\n\r\nexport interface ShopFilterFunctions {\r\n [name: string]: ShopFilterActionFunctions;\r\n}\r\n\r\nexport enum ShopFilterType {\r\n Schedule = 'Schedule',\r\n Shop = 'Shop',\r\n}\r\n\r\nexport interface ShopFilterDataProps {\r\n readonly isPublicWebMode: boolean;\r\n readonly expanded: boolean;\r\n readonly filterUIState: UIScheduleFilterState | UIShopFilterState;\r\n readonly filterHidden: boolean;\r\n readonly userFilters: ScheduleFilter;\r\n readonly filterableProperties: ScheduleFilter;\r\n readonly filterFunctions: ShopFilterFunctions;\r\n readonly totalNumberOfItems: number;\r\n readonly maxNumberOfItemsExcceeded: boolean;\r\n readonly translate: TranslateFunction;\r\n readonly listItemGroupingMappings: {\r\n Traeningspass: {\r\n [index: string]: string | string[];\r\n };\r\n };\r\n readonly isFullDesktopView: boolean;\r\n readonly isDesktopMode: boolean;\r\n readonly scheduleIsFetching: boolean;\r\n readonly filterType: ShopFilterType;\r\n readonly hideFilterSaving?: boolean;\r\n readonly hideTrashCan: boolean;\r\n readonly isAuthenticated: boolean;\r\n readonly shopFilter: [FilterCategory];\r\n readonly selectedTab: Tab;\r\n readonly giveToggleButtonSomeFocus: () => void;\r\n\r\n readonly productsIsShowing: boolean;\r\n\r\n onHideProductClick(): void;\r\n onFilterDelete(filterName: string): void;\r\n onFilterSave(filterName: string): void;\r\n onClearFilters(): void;\r\n}\r\n\r\nexport interface ShopFilterDataState {\r\n readonly selectedCategory: string;\r\n}\r\n\r\nexport interface ShopFilterActionProps {\r\n selectAllCategoryListItems: (value: string, category: string) => void;\r\n unSelectCategoryHeader: (value: string, category: string) => void;\r\n expandFilter: (expanded: boolean, filterType: ShopFilterType) => void;\r\n}\r\n\r\nexport type ShopFilterProps = ShopFilterDataProps & ShopFilterActionProps;\r\nexport type ShopFilterState = ShopFilterDataState;\r\n\r\nconst defaultPropertyKeys: ShopFilterCategoryListItemDataPropertyKeys = {\r\n // INFO: Only needed before we have proper mapping of properties\r\n listItemIdProperty: 'listItemId',\r\n listItemKeyProperty: 'listItemText',\r\n listItemTextProperty: 'listItemValueForDisplay',\r\n};\r\n\r\nfunction mapDataForListItem(filterProperties: ScheduleFilter, internalCategoryName: string): FilterChoice[] {\r\n if (!filterProperties || !filterProperties[internalCategoryName] || !filterProperties[internalCategoryName].length) {\r\n return [];\r\n }\r\n const values: string[] = filterProperties[internalCategoryName];\r\n let listItemValueForDisplay = '';\r\n switch (internalCategoryName) {\r\n default: {\r\n return values.map((value: string, index: number) => {\r\n listItemValueForDisplay = value;\r\n return getListItemData(value, index, internalCategoryName, listItemValueForDisplay);\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction getListItemData(value: string, index: number, internalCategoryName: string, listItemValueForDisplay: string) {\r\n return {\r\n SitecoreId: value,\r\n Name: value,\r\n Description: listItemValueForDisplay,\r\n Type: internalCategoryName,\r\n isSelected: false,\r\n };\r\n}\r\n\r\nfunction getActionFunctionsForCategory(\r\n filterFunctions: ShopFilterFunctions,\r\n categoryName: ScheduleFilterCategoryName | ShopFilterCategoryName | string\r\n): ShopFilterActionFunctions | undefined {\r\n const filterFunction = filterFunctions[categoryName];\r\n return filterFunction;\r\n}\r\n\r\nfunction renderCategoryContainer(\r\n showSearchbar: boolean,\r\n presentationCategoryName: string,\r\n internalCategoryName: ScheduleFilterCategoryName | ShopFilterCategoryName,\r\n filterCategoryListItemDataPropertyKeys: ShopFilterCategoryListItemDataPropertyKeys,\r\n props: ShopFilterProps\r\n) {\r\n // TODO : NOTE: A lot of this code should be moved to Schedule.tsx because this file should be as agnostic to the data it receives as possible.\r\n let categoryData: FilterChoice[];\r\n // const categoryName: string = getCategoryName(props, internalCategoryName);\r\n const categoryName = internalCategoryName;\r\n switch (internalCategoryName) {\r\n // INFO: If we need special handling of a category's data, this is where we want to do it.\r\n default: {\r\n categoryData = mapDataForListItem(props.filterableProperties, internalCategoryName);\r\n }\r\n }\r\n const listItemGroupingMapping = props.listItemGroupingMappings\r\n ? props.listItemGroupingMappings[internalCategoryName]\r\n : undefined;\r\n\r\n if (props.filterType === ShopFilterType.Shop) {\r\n // If we are in the shop filter and we have only 1 category value then we want to hide the category filter for that category\r\n const weHaveFewerThan2Categories = categoryData.length < 2;\r\n if (weHaveFewerThan2Categories) {\r\n return null;\r\n }\r\n }\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction renderScheduleCategories(\r\n filterCategoryListItemDataPropertyKeys: ShopFilterCategoryListItemDataPropertyKeys,\r\n props: ShopFilterProps,\r\n showFilter: boolean\r\n) {\r\n // *********** OBS! FavoritFilter temporarily hidden until further fixes\r\n // const stringFavoritFilter = (props.translate(SitecoreDictionary.Schedule.Filter.Categories.Favoritfilter) as string);\r\n const stringTraeningsstaelle = props.translate(\r\n SitecoreDictionary.Schedule.Filter.Categories.Traeningsstaelle\r\n ) as string;\r\n const stringTraeningspass = props.translate(SitecoreDictionary.Schedule.Filter.Categories.Traeningspass) as string;\r\n const stringLedareOrTraenare = props.translate(\r\n SitecoreDictionary.Schedule.Filter.Categories.LedareOrTraenare\r\n ) as string;\r\n const stringTidpunkt = props.translate(SitecoreDictionary.Schedule.Filter.Categories.Tidpunkt) as string;\r\n const stringVeckodag = props.translate(SitecoreDictionary.Schedule.Filter.Categories.Veckodag) as string;\r\n return (\r\n \r\n {/*
    */}\r\n {/*\r\n props.isAuthenticated &&\r\n renderCategoryContainer(false, stringFavoritFilter, ScheduleFilterCategoryName.Favoritfilter, filterCategoryListItemDataPropertyKeys, props)\r\n */}\r\n {renderCategoryContainer(\r\n true,\r\n stringTraeningsstaelle,\r\n ScheduleFilterCategoryName.Traeningsstaelle,\r\n filterCategoryListItemDataPropertyKeys,\r\n props\r\n )}\r\n {renderCategoryContainer(\r\n true,\r\n stringTraeningspass,\r\n ScheduleFilterCategoryName.Traeningspass,\r\n filterCategoryListItemDataPropertyKeys,\r\n props\r\n )}\r\n {renderCategoryContainer(\r\n true,\r\n stringLedareOrTraenare,\r\n ScheduleFilterCategoryName.LedareOrTraenare,\r\n filterCategoryListItemDataPropertyKeys,\r\n props\r\n )}\r\n {renderCategoryContainer(\r\n false,\r\n stringTidpunkt,\r\n ScheduleFilterCategoryName.Tidpunkt,\r\n filterCategoryListItemDataPropertyKeys,\r\n props\r\n )}\r\n {renderCategoryContainer(\r\n false,\r\n stringVeckodag,\r\n ScheduleFilterCategoryName.Veckodag,\r\n filterCategoryListItemDataPropertyKeys,\r\n props\r\n )}\r\n {/*
    */}\r\n
    \r\n );\r\n}\r\n\r\nfunction getClasses(props: ShopFilterProps) {\r\n const baseClass = 'newFilter';\r\n let filterClasses = baseClass;\r\n if (props.expanded) {\r\n filterClasses = filterClasses + ` ${baseClass}--expanded`;\r\n }\r\n if (props.filterHidden) {\r\n filterClasses = filterClasses + ` ${baseClass}--hidden`;\r\n }\r\n if (filterUtils.hasCategoryExpanded(props.filterUIState.categoryState)) {\r\n filterClasses = filterClasses + ` ${baseClass}--hasExpandedCategory`;\r\n }\r\n return filterClasses;\r\n}\r\n\r\nexport class ShopFilter extends React.Component {\r\n constructor(props: ShopFilterProps) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedCategory: '1',\r\n };\r\n }\r\n\r\n getCurrentUserFilterAmount = () => {\r\n let currentUserFilter = 0;\r\n\r\n if (this.props.userFilters.Traeningsstaelle) {\r\n currentUserFilter += this.props.userFilters.Traeningsstaelle.length;\r\n }\r\n\r\n if (this.props.userFilters.Traeningspass) {\r\n currentUserFilter += this.props.userFilters.Traeningspass.length;\r\n }\r\n\r\n if (this.props.userFilters.LedareOrTraenare) {\r\n currentUserFilter += this.props.userFilters.LedareOrTraenare.length;\r\n }\r\n\r\n if (this.props.userFilters.Tidpunkt) {\r\n currentUserFilter += this.props.userFilters.Tidpunkt.length;\r\n }\r\n\r\n if (this.props.userFilters.Veckodag) {\r\n currentUserFilter += this.props.userFilters.Veckodag.length;\r\n }\r\n\r\n if (currentUserFilter === 0) {\r\n return null;\r\n } else {\r\n return ' (' + currentUserFilter + ')';\r\n }\r\n };\r\n\r\n renderFilterButton = () => {\r\n return (\r\n
    \r\n
    \r\n this.props.onHideProductClick()} />\r\n
    \r\n
    \r\n );\r\n };\r\n\r\n renderShopCategories(\r\n filterCategoryListItemDataPropertyKeys: ShopFilterCategoryListItemDataPropertyKeys,\r\n props: ShopFilterProps\r\n ) {\r\n const translate = this.props.translate;\r\n switch (props.selectedTab) {\r\n case Tab.Local:\r\n return this.props.shopFilter.map((item, index) => {\r\n if (item.Children.length > 1) {\r\n return this.renderShopCategoryContainer(\r\n false,\r\n item.SitecoreId,\r\n item.Name,\r\n item.Description,\r\n props,\r\n item.Children\r\n );\r\n }\r\n return ;\r\n });\r\n case Tab.TwoBusinessUnits:\r\n return (\r\n
    \r\n
    \r\n
    {translate(SitecoreDictionary.Shop.Filter.TwoBusinessUnitsCardTitle)}
    \r\n

    {translate(SitecoreDictionary.Shop.Filter.TwoBusinessUnitsCardDescription)}

    \r\n
    \r\n
    \r\n );\r\n case Tab.National:\r\n return (\r\n
    \r\n
    \r\n
    {translate(SitecoreDictionary.Shop.Filter.NationalCardTitle)}
    \r\n

    {translate(SitecoreDictionary.Shop.Filter.NationalCardDescription)}

    \r\n
    \r\n
    \r\n );\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n renderShopCategoryContainer(\r\n showSearchbar: boolean,\r\n SitecoreId: string,\r\n internalCategoryName: string,\r\n categoryDescription: string,\r\n props: ShopFilterProps,\r\n subCategories: FilterChoice[]\r\n ) {\r\n let categoryData = subCategories;\r\n const categoryName = internalCategoryName;\r\n\r\n switch (internalCategoryName) {\r\n default: {\r\n categoryData = mapDataForListItem(props.filterableProperties, internalCategoryName);\r\n }\r\n }\r\n\r\n const listItemGroupingMapping = props.listItemGroupingMappings\r\n ? props.listItemGroupingMappings[internalCategoryName]\r\n : undefined;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n setClickedCategory = (id: string) => {\r\n this.setState({\r\n ...this.state,\r\n selectedCategory: this.state.selectedCategory === id ? '' : id,\r\n });\r\n };\r\n\r\n render() {\r\n const filterIsForSchedule = this.props.filterType === ShopFilterType.Schedule;\r\n const filterIsForShop = this.props.filterType === ShopFilterType.Shop;\r\n\r\n const showFilter = filterIsForSchedule && this.props.isFullDesktopView;\r\n return (\r\n
    \r\n {this.props.productsIsShowing && this.renderFilterButton()}\r\n\r\n {!filterIsForShop && renderScheduleCategories(defaultPropertyKeys, this.props, showFilter)}\r\n\r\n {filterIsForShop && this.props.shopFilter && this.renderShopCategories(defaultPropertyKeys, this.props)}\r\n\r\n {this.props.shopFilter.length <= 0 && }\r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconBigClose, IconArrow } from 'components/icons';\r\n\r\ninterface BackButtonActionProps {\r\n goBack: () => void;\r\n icon: 'chevron' | 'close';\r\n className?: string;\r\n}\r\n\r\nexport type BackButtonProps = BackButtonActionProps;\r\n\r\nexport const BackButton: React.SFC = (props: BackButtonProps) => {\r\n return (\r\n
    \r\n {props.icon === 'close' && }\r\n {props.icon === 'chevron' && }\r\n
    \r\n );\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { ShopFilter, ShopFilterActionProps, ShopFilterDataProps, ShopFilterType } from './ShopFilter';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { UIScheduleFilterAction, UIScheduleFilterActionType } from 'store/global/ui/schedule-filter';\r\nimport { UIShopFilterAction, UIShopFilterActionType } from 'store/global/ui/shop-filter';\r\nimport { fetchPassListFromActiveFoereningInBackground } from 'store/pass';\r\nimport { getBookingsInBackground } from 'store/bokningar';\r\n\r\nconst expandFilter = (expanded: boolean, filterType: ShopFilterType) => (\r\n dispatch: Dispatch\r\n) => {\r\n if (filterType === ShopFilterType.Schedule) {\r\n if (expanded) {\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetFilterToMinimised,\r\n expanded: false,\r\n });\r\n } else {\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetFilterToExpanded,\r\n expanded: true,\r\n });\r\n }\r\n }\r\n\r\n if (filterType === ShopFilterType.Shop) {\r\n if (expanded) {\r\n dispatch({\r\n type: UIShopFilterActionType.SetFilterToMinimised,\r\n expanded: false,\r\n });\r\n } else {\r\n dispatch({\r\n type: UIShopFilterActionType.SetFilterToExpanded,\r\n expanded: true,\r\n });\r\n }\r\n }\r\n};\r\n\r\nconst mapState = (state: RootState, props: any): ShopFilterDataProps => {\r\n const expanded = props.filterType === ShopFilterType.Schedule ? state.global.ui.scheduleFilter.expanded : true;\r\n return {\r\n productsIsShowing: props.productsIsShowing,\r\n onHideProductClick: props.onHideProductClick,\r\n\r\n isAuthenticated: !!state.auth.read.isAuthenticated,\r\n isPublicWebMode: props.isPublicWebMode,\r\n expanded: expanded,\r\n filterUIState: props.filterUIState,\r\n filterHidden: props.filterHidden,\r\n userFilters: props.userFilters,\r\n filterableProperties: props.filterableProperties,\r\n filterFunctions: props.filterFunctions,\r\n totalNumberOfItems: props.totalNumberOfItems,\r\n maxNumberOfItemsExcceeded: props.maxNumberOfItemsExcceeded,\r\n translate: props.translate,\r\n onFilterSave: props.onFilterSave,\r\n onFilterDelete: props.onFilterDelete,\r\n onClearFilters: props.onClearFilters,\r\n listItemGroupingMappings: props.listItemGroupingMappings,\r\n isFullDesktopView: props.isFullDesktopView,\r\n isDesktopMode: props.isDesktopMode,\r\n scheduleIsFetching: props.scheduleIsFetching,\r\n filterType: props.filterType,\r\n hideFilterSaving: props.hideFilterSaving,\r\n hideTrashCan:\r\n state.product.fullSetOfFilterProperties.ProductWho.length < 2 &&\r\n state.product.fullSetOfFilterProperties.ProductWhere.length < 2 &&\r\n state.product.fullSetOfFilterProperties.ProductWhen.length < 2 &&\r\n state.product.fullSetOfFilterProperties.ProductHow.length < 2 &&\r\n props.filterType === ShopFilterType.Shop,\r\n shopFilter: props.shopFilter,\r\n selectedTab: props.selectedTab,\r\n giveToggleButtonSomeFocus: props.giveToggleButtonSomeFocus,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: any): ShopFilterActionProps => ({\r\n expandFilter: (expanded: boolean, filterType: ShopFilterType) => {\r\n dispatch(expandFilter(expanded, filterType));\r\n if (expanded) {\r\n dispatch(fetchPassListFromActiveFoereningInBackground());\r\n dispatch(getBookingsInBackground());\r\n }\r\n },\r\n selectAllCategoryListItems: props.selectAllCategoryListItems,\r\n unSelectCategoryHeader: props.unSelectCategoryHeader,\r\n});\r\n\r\nexport default connect(mapState, mapDispatchToProps)(ShopFilter);\r\n","import * as React from 'react';\r\nimport { IconMenuMembership, IconMenuStatistics } from 'components/icons';\r\nimport { getQueryStringValue } from 'utils';\r\nimport { FilterCategoryType } from 'store/global/ui/shop-filter';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface CategorySliderDataProps {\r\n translate: TranslateFunction;\r\n selectedCategory: string;\r\n}\r\n\r\nexport interface CategorySliderActionProps {\r\n setSelectedCategory: (categoryName: FilterCategoryType) => void;\r\n}\r\n\r\ninterface Category {\r\n name: FilterCategoryType;\r\n icon: JSX.Element;\r\n selected: boolean;\r\n}\r\n\r\ntype CategorySliderProps = CategorySliderDataProps & CategorySliderActionProps;\r\n\r\nexport const CategorySlider: React.FunctionComponent = ({\r\n translate,\r\n selectedCategory,\r\n setSelectedCategory,\r\n}) => {\r\n const [categories, setCategories] = React.useState([]);\r\n\r\n React.useEffect(() => {\r\n const category = getQueryStringValue('kategori');\r\n const newCategories: Category[] = [\r\n { name: 'Träningskort', icon: , selected: false },\r\n { name: 'Medlemskap', icon: , selected: false },\r\n ];\r\n if (category) {\r\n for (let i = 0; i < newCategories.length; i++) {\r\n const name = newCategories[i].name;\r\n if (name.toLowerCase() === category.toLowerCase()) {\r\n newCategories[i].selected = true;\r\n setSelectedCategory(name);\r\n }\r\n }\r\n } else {\r\n newCategories[0].selected = true;\r\n }\r\n setCategories(newCategories);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const setSelectedItem = (index: number, name: FilterCategoryType) => {\r\n const newCategories = [...categories];\r\n newCategories.forEach((item, loopIndex) => {\r\n item.selected = index === loopIndex;\r\n });\r\n setCategories(newCategories);\r\n setSelectedCategory(name);\r\n };\r\n\r\n return (\r\n
    3 ? 'scrollableSlider' : '')}>\r\n {categories.map((item, index) => (\r\n setSelectedItem(index, item.name)}\r\n className={\r\n ' CategorySlider__Item ' + (item.name === selectedCategory ? 'CategorySlider__Item--selected' : '')\r\n }\r\n key={item.name}\r\n >\r\n {item.icon}\r\n
    {item.name}
    \r\n
    \r\n ))}\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { IconChevron } from 'components/icons';\r\nimport { StatusBar, IconButton } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { CouldAddProduct } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ProductProps {\r\n isInBasket: boolean;\r\n product: fos.api.Product;\r\n translate: TranslateFunction;\r\n foereningNamn: string;\r\n isAdmin: boolean;\r\n canAddProduct: (product: fos.api.Product) => CouldAddProduct;\r\n addProduct: (product: fos.api.Product) => void;\r\n removeProduct: (product: fos.api.Product) => void;\r\n goToProductDetails: (id: number, name: string, foereningNamn: string, customerType: number) => void;\r\n}\r\nexport interface ProductItemState {\r\n statusMessageVisible: boolean;\r\n statusMessage: string;\r\n statusMessageClass: string;\r\n}\r\nexport class Product extends React.Component {\r\n statusMessageTimeout: number | undefined;\r\n constructor(props: ProductProps) {\r\n super(props);\r\n this.state = {\r\n statusMessageVisible: false,\r\n statusMessage: this.props.translate(SitecoreDictionary.Shop.ProductAddedToBasket) as string,\r\n statusMessageClass: 'StatusMessage--Green',\r\n };\r\n }\r\n\r\n handleClick = () => {\r\n const canAddProduct = this.props.canAddProduct(this.props.product);\r\n if (this.props.isInBasket) {\r\n this.props.removeProduct(this.props.product);\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: false,\r\n statusMessage: this.props.translate(SitecoreDictionary.Shop.ProductAddedToBasket) as string,\r\n statusMessageClass: 'StatusMessage--Green',\r\n });\r\n } else if (canAddProduct.canAdd) {\r\n this.props.addProduct(this.props.product);\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: true,\r\n statusMessage: this.props.translate(SitecoreDictionary.Shop.ProductAddedToBasket) as string,\r\n statusMessageClass: 'StatusMessage--Green',\r\n });\r\n } else if (!!canAddProduct.message) {\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: true,\r\n statusMessage: canAddProduct.message,\r\n statusMessageClass: 'StatusMessage--Black',\r\n });\r\n }\r\n this.setStatusMessageTimeout();\r\n };\r\n\r\n getIconButtonStyle = () => {\r\n if (this.props.isInBasket) {\r\n return '--Booked';\r\n } else {\r\n return '--Available';\r\n }\r\n };\r\n\r\n setStatusMessageTimeout = () => {\r\n this.statusMessageTimeout = window.setTimeout(\r\n () =>\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: false,\r\n }),\r\n 4500\r\n );\r\n };\r\n\r\n componentWillUnmount() {\r\n if (!!this.statusMessageTimeout) {\r\n clearTimeout(this.statusMessageTimeout);\r\n }\r\n }\r\n\r\n render() {\r\n const { product } = this.props;\r\n return (\r\n
    \r\n {product.hasOwnProperty('NamnSitecore') && (\r\n \r\n
    \r\n \r\n this.props.goToProductDetails(\r\n product.Id,\r\n product.NamnSitecore,\r\n this.props.foereningNamn,\r\n product.CustomerType.Id\r\n )\r\n }\r\n >\r\n

    {product.NamnSitecore}

    \r\n \r\n
    \r\n
    \r\n \r\n {product.Pris}:-\r\n {product.PaymentMethod === 'AutoGiro' && /mån}\r\n {product.NrOfMonths > 1 && product.PaymentMethod !== 'AutoGiro' && (\r\n \r\n ({Number((product.Pris / product.NrOfMonths).toFixed(0))}:- /mån)\r\n \r\n )}\r\n \r\n
    \r\n\r\n \r\n
    \r\n \r\n
    \r\n )}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Product } from './Product/Product';\r\nimport { CouldAddProduct } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\n\r\nexport interface ProductGroupProps {\r\n productsInBasket?: Array;\r\n title: string;\r\n data: Array;\r\n translate: TranslateFunction;\r\n foereningNamn: string;\r\n isAdmin: boolean;\r\n canAddProduct: (product: fos.api.Product) => CouldAddProduct;\r\n addProduct: (product: fos.api.Product) => void;\r\n removeProduct: (product: fos.api.Product) => void;\r\n goToProductDetails: (id: number, name: string, foereningNamn: string, customerType: number) => void;\r\n}\r\n\r\nexport class ProductGroup extends React.Component {\r\n checkIfInBasket = (id: number, customerTypeId: number) => {\r\n if (this.props.productsInBasket) {\r\n for (let i = 0; i < this.props.productsInBasket.length; i++) {\r\n if (\r\n this.props.productsInBasket[i].Id === id &&\r\n this.props.productsInBasket[i].CustomerType.Id === customerTypeId\r\n ) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n
    {this.props.title}
    \r\n {this.props.data.map(item => (\r\n \r\n ))}\r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ProductGroup } from './ProductGroup/ProductGroup';\r\nimport { ProductTypes } from 'store/shop';\r\n\r\nimport { SitecoreDictionary } from 'models/SitecoreDictionary';\r\nimport { CouldAddProduct } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ProductsProps {\r\n data?: boolean;\r\n shopFilter: Array;\r\n filters: Array;\r\n productType: ProductTypes;\r\n products: Array;\r\n isShowing: boolean;\r\n productsInBasket?: Array;\r\n translate: TranslateFunction;\r\n foereningNamn: string;\r\n isAdmin: boolean;\r\n canAddProduct: (product: fos.api.Product) => CouldAddProduct;\r\n addProduct: (product: fos.api.Product) => void;\r\n removeProduct: (product: fos.api.Product) => void;\r\n goToProductDetails: (id: number, name: string, foereningNamn: string, customerType: number) => void;\r\n}\r\n\r\ninterface ProduktGroup {\r\n title: string;\r\n id: string;\r\n products: Array;\r\n}\r\n\r\ninterface ProduktWithHits {\r\n hits: number;\r\n product: fos.api.Product;\r\n}\r\n\r\nexport class Products extends React.Component {\r\n render() {\r\n var productData: ProduktGroup[] = [];\r\n\r\n if (this.props.products.length > 0) {\r\n let productType = this.props.productType;\r\n productData = this.mapProductGroups(\r\n this.props.filters,\r\n this.props.products.filter(item => {\r\n return item.Types.indexOf(productType) > -1;\r\n })\r\n );\r\n }\r\n\r\n var allProducts = productData.find(o => o.id === '00');\r\n var strictlyMatchingProducts = productData.find(o => o.id === '01');\r\n var productsLoaded = this.props.products.length > 0;\r\n\r\n return (\r\n
    \r\n
    \r\n {productsLoaded && !allProducts && !strictlyMatchingProducts && (\r\n
    \r\n {this.props.translate(SitecoreDictionary.Shop.NoProductsFoundFromFilter)}\r\n
    \r\n )}\r\n {productData.map(item => {\r\n return (\r\n \r\n );\r\n })}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n mapProductGroups(filters: Array, products: Array): ProduktGroup[] {\r\n var groupedProducts: ProduktGroup[] = [];\r\n var selectedFilters = this.getSelectedFilters(filters);\r\n var nrOfSelectedFilters = selectedFilters.length;\r\n if (nrOfSelectedFilters < 1) {\r\n groupedProducts.push({\r\n title: this.props.translate(SitecoreDictionary.Shop.AllProducts) as string,\r\n id: '00',\r\n products: products,\r\n });\r\n } else {\r\n var productsWithHits = this.getProductsWithFilterHits(selectedFilters, products);\r\n\r\n var exactHits = productsWithHits.filter(product => {\r\n return product.hits === nrOfSelectedFilters;\r\n });\r\n var others = productsWithHits.filter(product => {\r\n return product.hits !== nrOfSelectedFilters && product.hits >= 0;\r\n });\r\n\r\n if (exactHits.length) {\r\n groupedProducts.push({\r\n title: this.props.translate(SitecoreDictionary.Shop.ExactHits) as string,\r\n id: '01',\r\n products: exactHits.map(this.reduceProductHit),\r\n });\r\n }\r\n\r\n if (others.length) {\r\n groupedProducts.push({\r\n title:\r\n exactHits.length > 0\r\n ? (this.props.translate(SitecoreDictionary.Shop.OtherHits) as string)\r\n : (this.props.translate(SitecoreDictionary.Shop.NoExactHits) as string),\r\n id: '02',\r\n products: others\r\n .sort((a, b) => {\r\n return b.hits - a.hits;\r\n })\r\n .map(this.reduceProductHit),\r\n });\r\n }\r\n }\r\n return groupedProducts;\r\n }\r\n\r\n getSelectedFilters(filters: Array): string[] {\r\n var arr: string[] = [];\r\n if (filters.length) {\r\n arr = filters\r\n .map(x => x.Children)\r\n .reduce((a, b) => a.concat(b))\r\n .filter(x => x.isSelected)\r\n .map(x => x.SitecoreId);\r\n }\r\n return arr;\r\n }\r\n\r\n getProductsWithFilterHits(selectedFilters: string[], products: Array): ProduktWithHits[] {\r\n var data: ProduktWithHits[] = [];\r\n\r\n for (var i = 0; i < products.length; i++) {\r\n var product = products[i];\r\n var hits = this.getHitsForProductsAndFilter(selectedFilters, product);\r\n data.push({ product, hits });\r\n }\r\n\r\n return data;\r\n }\r\n\r\n getHitsForProductsAndFilter(selectedFilters: string[], product: fos.api.Product): number {\r\n var hits = 0;\r\n for (var i = 0; i < selectedFilters.length; i++) {\r\n if (product.FilterVal.indexOf(selectedFilters[i]) > -1) {\r\n hits += 1;\r\n }\r\n }\r\n return hits;\r\n }\r\n\r\n reduceProductHit(product: ProduktWithHits): fos.api.Product {\r\n return product.product;\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { Dispatch, RootState } from 'store';\r\nimport { store } from 'index';\r\nimport { ShopDataProps, ShopActionProps, Shop, ShopFilterFunctions } from './Shop';\r\nimport {\r\n // models and types\r\n ProductHows,\r\n ProductWhens,\r\n ProductWhos,\r\n ShopFilter,\r\n ShopFilterCategoryNames,\r\n // selectors\r\n getFilters,\r\n\r\n // actions\r\n // ShopActionResetProductsFilter,\r\n // dispatches\r\n clearShopFilterOptionsCategory,\r\n updateShopFilterOptionsCategory,\r\n updateShopResetProductsFilter,\r\n} from 'store/shop';\r\nimport { createBasket, addProduct, removeProduct } from 'store/basket';\r\nimport { LocationActionTypes, switchView, productDetailsRouteAction, getIsAdminWebMode } from 'store/location';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport {\r\n FetchStatusAggregateTypes,\r\n getIsFetching,\r\n getIsFetched,\r\n FetchCommandTypes,\r\n getIsExecuting,\r\n} from 'store/global/fetch';\r\nimport {\r\n UIShopFilterState,\r\n setSelectedCategory,\r\n FilterCategoryType,\r\n toggleShowProducts,\r\n} from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\n\r\nimport { getIsPublicWebMode } from 'store/location';\r\nimport { removeSubscription } from './Order/Order';\r\n// import { Dispatch } from 'store';\r\n\r\nfunction onFilterCategoryItems(value: string, category: string) {\r\n // Do nothing as we do not filter products\r\n}\r\n\r\nconst onSelectCategoryItem = (value: string, category: string) => {\r\n //\r\n const categoryName: ShopFilterCategoryNames = category as ShopFilterCategoryNames;\r\n const selectedItemsInRelevantCategory: string[] = store.getState().product.userSelectedFilterOptions[categoryName];\r\n let valueAlreadySelected: boolean = false;\r\n switch (categoryName) {\r\n // case ScheduleFilterCategoryName.Veckodag: {\r\n // // TODO: Investigate removal once we have concluded that we do not need to handle this case specially\r\n // valueAlreadySelected = !!find(selectedItemsInRelevantCategory, (selected) => selected === value);\r\n //\r\n // break;\r\n // }\r\n default: {\r\n valueAlreadySelected = !!selectedItemsInRelevantCategory.find(selected => selected === value);\r\n }\r\n }\r\n if (selectedItemsInRelevantCategory) {\r\n if (valueAlreadySelected) {\r\n const selecteItemsdWithoutCurrentValue = selectedItemsInRelevantCategory.filter(text => text !== value);\r\n store.dispatch(updateShopFilterOptionsCategory(categoryName, selecteItemsdWithoutCurrentValue));\r\n } else {\r\n let arrayToAppend: string[] | ProductWhos[] | ProductWhens[] | ProductHows[]; // We clone so as not to change the store value directly\r\n switch (category) {\r\n // case ScheduleFilterCategoryName.Favoritfilter: {\r\n // arrayToAppend = [value];\r\n // break;\r\n // }\r\n default: {\r\n arrayToAppend = [...selectedItemsInRelevantCategory];\r\n arrayToAppend.push(value);\r\n arrayToAppend.sort();\r\n }\r\n }\r\n store.dispatch(updateShopFilterOptionsCategory(categoryName, arrayToAppend));\r\n }\r\n }\r\n};\r\n\r\nfunction onDeselectCategoryItem(value: string, category: string) {\r\n // Do nothing\r\n}\r\n\r\nfunction onClearCategoryFilters(category: string) {\r\n const categoryName: ShopFilterCategoryNames = category as ShopFilterCategoryNames;\r\n store.dispatch(clearShopFilterOptionsCategory(categoryName));\r\n}\r\n\r\nconst defaultFilterFunctions = {\r\n onFilter: onFilterCategoryItems,\r\n onSelect: onSelectCategoryItem,\r\n onDeselect: onDeselectCategoryItem,\r\n onClearCategoryFilters: onClearCategoryFilters,\r\n};\r\nconst filterFunctions: ShopFilterFunctions = {\r\n ProductWho: defaultFilterFunctions,\r\n ProductWhere: defaultFilterFunctions,\r\n ProductWhen: defaultFilterFunctions,\r\n ProductHow: defaultFilterFunctions,\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): ShopDataProps => {\r\n const shopFilterUIState: UIShopFilterState = state.global.ui.shopFilter;\r\n const cachedFullSetOfFilterProperties: ShopFilter = state.product.fullSetOfFilterProperties;\r\n const shopFoerening = state.global.session.shopFoerening!;\r\n const foerening = state.foereningar.read.Foereningar.find(f => '' + f.Id === '' + shopFoerening);\r\n return {\r\n isPublicWebMode: getIsPublicWebMode(state.location),\r\n products: state.product.filteredProducts,\r\n filters: state.product.filteredFilterCategories,\r\n isFetchingFilters: getIsFetching(state.global.fetch, shopFoerening, FetchStatusAggregateTypes.GET_FILTER),\r\n isFiltersFetched: getIsFetched(state.global.fetch, shopFoerening, FetchStatusAggregateTypes.GET_FILTER),\r\n isDesktopMode: props.isDesktopMode,\r\n shopFoerening: shopFoerening,\r\n productsInBasket: state.shoppingBasket.products,\r\n isAuthenticated:\r\n state.auth.read.isAuthenticated && state.global.session.activeFoerening === state.global.session.shopFoerening,\r\n translate: getTranslate(state.locale),\r\n filterUIState: shopFilterUIState,\r\n cachedUserFilters: state.product.userSelectedFilterOptions,\r\n cachedFullSetOfFilterProperties: cachedFullSetOfFilterProperties,\r\n filterFunctions: filterFunctions,\r\n selectedCategory: state.global.ui.shopFilter.selectedCategory,\r\n foereningNamn: !!foerening ? foerening.Namn : '',\r\n foereningDisplayName: !!foerening ? foerening.DisplayName : '',\r\n isVisiting: state.global.session.activeFoerening !== state.global.session.shopFoerening,\r\n isShowingProducts: state.global.ui.shopFilter.ShouldShowProducts,\r\n orderId: state.global.session.orderId!,\r\n isAdmin: getIsAdminWebMode(state.location),\r\n adminError: state.global.errors.adminError,\r\n isPendingOrderChange:\r\n getIsExecuting(state.global.fetch, '' + state.global.session.orderId, FetchCommandTypes.ADD_TO_ORDER) ||\r\n getIsExecuting(state.global.fetch, '' + state.global.session.orderId, FetchCommandTypes.REMOVE_FROM_ORDER),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): ShopActionProps => ({\r\n getFilters: (foereningId: number) => dispatch(getFilters(foereningId)),\r\n createBasket: (foereningId: number) => dispatch(createBasket(foereningId)),\r\n addProduct: (product: fos.api.Product, foereningId: number) => dispatch(addProduct(product, foereningId)),\r\n removeProduct: (product: fos.api.Product, foereningId: number, orderId: number) => {\r\n removeSubscription(foereningId, orderId, product.Id);\r\n dispatch(removeProduct(product, foereningId));\r\n },\r\n goToLogin: () => dispatch(switchView(LocationActionTypes.Home)),\r\n onClearFilters: () => dispatch(updateShopResetProductsFilter()),\r\n setSelectedCategory: (selectedCategory: FilterCategoryType) => dispatch(setSelectedCategory(selectedCategory)),\r\n goToProductDetails: (id: number, name: string, foereningNamn: string, customerType: number) =>\r\n dispatch(productDetailsRouteAction(id, name, foereningNamn, customerType)),\r\n toggleShowProducts: (showing: boolean) => dispatch(toggleShowProducts(showing)),\r\n});\r\n\r\nexport const ShopContainer = connect(mapStateToProps, mapDispatchToProps)(Shop);\r\n","import * as React from 'react';\r\nimport { IconMenuMembership, IconChevron, IconMenuNews, IconBookingStatus } from '../icons';\r\nimport { NavLink } from 'redux-first-router-link';\r\n\r\nexport interface NotificationProps {\r\n notification: fos.api.Notification;\r\n}\r\n\r\nexport enum NotificationTypes {\r\n PASS_CANCELLED = 'PASS_CANCELLED',\r\n PASS_VAENTELISTA_FAATT_PLATS = 'PASS_VAENTELISTA_FAATT_PLATS',\r\n NEWS = 'NEWS',\r\n TRAENINGSKORT_EXPIRE = 'TRAENINGSKORT_EXPIRE',\r\n}\r\n\r\nexport class Notification extends React.Component {\r\n\r\n getIcon() {\r\n if (this.props.notification.NotificationType === NotificationTypes.NEWS) {\r\n return ;\r\n } else if (this.props.notification.NotificationType === NotificationTypes.PASS_CANCELLED) {\r\n return ;\r\n } else if (this.props.notification.NotificationType === NotificationTypes.PASS_VAENTELISTA_FAATT_PLATS) {\r\n return ;\r\n } else if (this.props.notification.NotificationType === NotificationTypes.TRAENINGSKORT_EXPIRE) {\r\n return ;\r\n }\r\n return;\r\n }\r\n\r\n getClassNames() {\r\n let classModifiers = '';\r\n let baseClass = 'Notification';\r\n\r\n if (!this.props.notification.Read) {\r\n classModifiers += ' Notification--unread';\r\n }\r\n if (this.props.notification.Link) {\r\n classModifiers += ' Notification--clickable';\r\n }\r\n\r\n return baseClass + classModifiers;\r\n }\r\n\r\n getShortText() {\r\n let text = '';\r\n let maxStr = 100;\r\n if (this.props.notification.Text.length > maxStr) {\r\n text = this.props.notification.Text.substring(0, maxStr);\r\n text += '...';\r\n } else {\r\n text = this.props.notification.Text;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n handleOnClick(e: React.MouseEvent, props: NotificationProps) {\r\n e.preventDefault();\r\n this.openUrl();\r\n }\r\n render() {\r\n if (this.props.notification.Link) {\r\n return (\r\n
    \r\n {this.props.notification.Link && this.props.notification.Link.startsWith('http') && (\r\n \r\n
    {this.getIcon()}
    \r\n
    \r\n
    {this.props.notification.Rubrik}
    \r\n

    {this.getShortText()}

    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n {this.props.notification.Link && !this.props.notification.Link.startsWith('http') && (\r\n this.handleOnClick(e, this.props)}\r\n to={this.props.notification.Link}\r\n >\r\n
    {this.getIcon()}
    \r\n
    \r\n
    {this.props.notification.Rubrik}
    \r\n

    {this.getShortText()}

    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n )}\r\n
    \r\n );\r\n }\r\n return (\r\n
    \r\n
    {this.getIcon()}
    \r\n
    \r\n
    {this.props.notification.Rubrik}
    \r\n

    {this.getShortText()}

    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private openUrl() {\r\n window.open(this.props.notification.Link, '_blank');\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { canAddProduct } from 'utils';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { UIShopFilterState, FilterCategoryType } from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\nimport { ShopFilter, ProductTypes } from 'store/shop/shopModels';\r\n\r\nimport { ShopFilterActionFunctions } from '../common/shopFilter/filter-category';\r\nimport ShopFilterContainer from 'components/common/shopFilter/ShopFilterContainer';\r\nimport { ShopFilterType } from '../common/shopFilter/ShopFilter';\r\nimport { CategorySlider } from './CategorySlider/CategorySlider';\r\nimport { Tabs, Tab } from './Tabs/Tabs';\r\n\r\nimport { Products } from './Products/Products';\r\nimport { addProductToOrder } from './Order/Order';\r\nimport { lockBackgroundScroll, unlockBackgroundCallback } from 'websd/utils';\r\nimport { BackButton } from 'components/header/HeaderContent/BackButton';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ShopFilterFunctions {\r\n ProductWho: ShopFilterActionFunctions;\r\n ProductWhere: ShopFilterActionFunctions;\r\n ProductWhen: ShopFilterActionFunctions;\r\n ProductHow: ShopFilterActionFunctions;\r\n}\r\n\r\nexport interface ShopDataProps {\r\n isPublicWebMode: boolean;\r\n products: Array;\r\n productsInBasket: Array;\r\n filters: Array;\r\n isDesktopMode: boolean;\r\n shopFoerening: number;\r\n isAuthenticated?: boolean;\r\n translate: TranslateFunction;\r\n isFetchingFilters: boolean;\r\n isFiltersFetched: boolean;\r\n filterUIState: UIShopFilterState;\r\n cachedUserFilters: ShopFilter;\r\n cachedFullSetOfFilterProperties: ShopFilter;\r\n filterFunctions: ShopFilterFunctions;\r\n selectedCategory: FilterCategoryType;\r\n foereningNamn: string;\r\n foereningDisplayName: string;\r\n isVisiting: boolean;\r\n isShowingProducts: boolean;\r\n orderId: number;\r\n isAdmin: boolean;\r\n adminError?: string;\r\n isPendingOrderChange: boolean;\r\n}\r\n\r\nexport interface ShopActionProps {\r\n getFilters: (foereningId: number) => void;\r\n createBasket: (foereningId: number) => void;\r\n addProduct: (product: fos.api.Product, foereningId: number) => void;\r\n removeProduct: (product: fos.api.Product, foereningId: number, orderId: number) => void;\r\n goToLogin: () => void;\r\n onClearFilters: () => void;\r\n setSelectedCategory: (categoryName: FilterCategoryType) => void;\r\n goToProductDetails: (id: number, name: string, foereningNamn: string, customerType: number) => void;\r\n toggleShowProducts: (showing: boolean) => void;\r\n}\r\n\r\nexport interface ShopState {\r\n selectedTab: Tab;\r\n tabs: Tab[];\r\n\r\n toggleButtonHasSomeFocus: boolean;\r\n unlockBackgroundCallback?: unlockBackgroundCallback;\r\n}\r\n\r\nexport interface FilterData {\r\n ProductName: string;\r\n TargetGroup: string;\r\n When: string;\r\n ValidityPerdiod: string;\r\n}\r\n\r\ntype ShopProps = Readonly;\r\n\r\nexport const Shop: React.FunctionComponent = ({\r\n isPublicWebMode,\r\n products,\r\n productsInBasket,\r\n filters,\r\n isDesktopMode,\r\n shopFoerening,\r\n isAuthenticated,\r\n translate,\r\n isFetchingFilters,\r\n isFiltersFetched,\r\n filterUIState,\r\n cachedUserFilters,\r\n cachedFullSetOfFilterProperties,\r\n filterFunctions,\r\n selectedCategory,\r\n foereningNamn,\r\n foereningDisplayName,\r\n isVisiting,\r\n isShowingProducts,\r\n orderId,\r\n isAdmin,\r\n adminError,\r\n isPendingOrderChange,\r\n getFilters,\r\n createBasket,\r\n addProduct,\r\n removeProduct,\r\n goToLogin,\r\n onClearFilters,\r\n setSelectedCategory,\r\n goToProductDetails,\r\n toggleShowProducts,\r\n}) => {\r\n const [selectedTab, setSelectedTab] = React.useState(Tab.Local);\r\n const [tabs, setTabs] = React.useState([]);\r\n const [toggleButtonHasSomeFocus, setToggleButtonHasSomeFocus] = React.useState(false);\r\n const [unlockBackgroundCallback, setUnlockBackgroundCallback] = React.useState<\r\n unlockBackgroundCallback | undefined\r\n >();\r\n\r\n React.useEffect(() => {\r\n if (isShowingProducts) {\r\n setUnlockBackgroundCallback(lockBackgroundScroll());\r\n }\r\n return () => {\r\n if (unlockBackgroundCallback) {\r\n unlockBackgroundCallback();\r\n }\r\n };\r\n //eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n const tabs: Tab[] = [Tab.Local];\r\n if (!!products.find(p => !!p.Types.find(t => t === ProductTypes.Tvaafoereningskort))) {\r\n tabs.push(Tab.TwoBusinessUnits);\r\n }\r\n\r\n // Just nu kollar vi inte om det finns nationella träningskort, då det inte finns några sådana kort än.\r\n // if (!!newProps.products.find(p => !!p.Types.find(t => t === ProductTypes.Nationellt_Traeningskort))) {\r\n tabs.push(Tab.National);\r\n // }\r\n setTabs(tabs);\r\n }, [products]);\r\n\r\n React.useEffect(() => {\r\n if (!isFetchingFilters && !isFiltersFetched) {\r\n getFilters(shopFoerening);\r\n createBasket(shopFoerening);\r\n }\r\n }, [isFetchingFilters, isFiltersFetched, getFilters, createBasket, shopFoerening]);\r\n\r\n React.useEffect(() => {\r\n if (!isAuthenticated && !isVisiting) {\r\n goToLogin();\r\n }\r\n }, [isAuthenticated, isVisiting, goToLogin]);\r\n\r\n const toggleProducts = () => {\r\n if (!!unlockBackgroundCallback) {\r\n unlockBackgroundCallback();\r\n }\r\n if (!isShowingProducts) {\r\n setUnlockBackgroundCallback(lockBackgroundScroll());\r\n }\r\n\r\n toggleShowProducts(!isShowingProducts);\r\n };\r\n\r\n const giveToggleButtonSomeFocus = () => {\r\n setToggleButtonHasSomeFocus(true);\r\n setTimeout(() => {\r\n setToggleButtonHasSomeFocus(false);\r\n }, 100);\r\n };\r\n\r\n const categoryId =\r\n selectedCategory === 'Träningskort'\r\n ? selectedTab === Tab.TwoBusinessUnits\r\n ? ProductTypes.Tvaafoereningskort\r\n : selectedTab === Tab.National\r\n ? ProductTypes.Nationellt_Traeningskort\r\n : ProductTypes.Traeningskort\r\n : ProductTypes.Medlemskap;\r\n return (\r\n \r\n {!!adminError &&
    {adminError}
    }\r\n
    \r\n
    \r\n \r\n\r\n {selectedCategory === 'Träningskort' && (\r\n \r\n setSelectedTab(tab)}\r\n selectedTab={selectedTab}\r\n foereningNamn={foereningDisplayName}\r\n />\r\n \r\n \r\n )}\r\n\r\n {selectedCategory === 'Medlemskap' && (\r\n \r\n {isShowingProducts && (\r\n \r\n
    \r\n
    \r\n toggleProducts()} />\r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n
    {translate(SitecoreDictionary.Shop.MembershipTitle)}
    \r\n

    {translate(SitecoreDictionary.Shop.MembershipDescription)}

    \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n\r\n {selectedTab !== Tab.National && (\r\n \r\n canAddProduct(product, translate, productsInBasket, isPendingOrderChange)\r\n }\r\n addProduct={(product: fos.api.Product) => {\r\n addProduct(product, shopFoerening);\r\n addProductToOrder(shopFoerening, orderId, product);\r\n }}\r\n removeProduct={(product: fos.api.Product) => {\r\n removeProduct(product, shopFoerening, orderId);\r\n }}\r\n foereningNamn={foereningNamn}\r\n productsInBasket={productsInBasket}\r\n goToProductDetails={goToProductDetails}\r\n productType={categoryId}\r\n isAdmin={isAdmin}\r\n />\r\n )}\r\n\r\n {selectedTab !== Tab.National && (\r\n
    \r\n toggleProducts()}\r\n >\r\n {!isShowingProducts\r\n ? translate(SitecoreDictionary.Shop.DisplayProducts)\r\n : translate(SitecoreDictionary.Shop.HideProducts)}\r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface GrayLabelProps {\r\n readonly labelText: string;\r\n}\r\n\r\nexport const GrayLabel: React.SFC = props =>
    {props.labelText}
    ;\r\n","import * as React from 'react';\r\nimport { IconChevron } from 'components/icons';\r\n\r\nexport interface ProductMobileHeaderProps {\r\n title: string;\r\n isExpanded: boolean;\r\n price: number;\r\n\r\n handleToggleProduct: () => void;\r\n}\r\n\r\nexport const ProductMobileHeader: React.SFC = props => (\r\n props.handleToggleProduct()}\r\n >\r\n
    {props.title}
    \r\n
    {props.price}:–
    \r\n
    \r\n \r\n
    \r\n \r\n);\r\n","import * as React from 'react';\r\nimport checkMark from 'static/assets/icon-checkmark--black.svg';\r\nimport { MainButton } from 'components/common';\r\nimport { ProductMobileHeader } from '.';\r\nimport { GrayLabel } from 'components/common/gray-label';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ProductDataProps {\r\n features: Array;\r\n htmlFeatures?: string;\r\n isDesktopMode: boolean;\r\n product: fos.api.Product;\r\n canBuyProduct: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface ProductActionProps {\r\n addProduct: (product: fos.api.Product) => void;\r\n}\r\n\r\ninterface ProductLocalProps {\r\n isExpanded: boolean;\r\n}\r\n\r\ntype ProductProps = ProductDataProps & ProductActionProps;\r\nexport class Product extends React.Component {\r\n constructor(props: ProductProps) {\r\n super(props);\r\n this.state = {\r\n isExpanded: false,\r\n };\r\n\r\n this.toggleProduct = this.toggleProduct.bind(this);\r\n }\r\n\r\n toggleProduct() {\r\n this.setState({\r\n isExpanded: !this.state.isExpanded,\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n {!this.props.isDesktopMode && (\r\n \r\n )}\r\n\r\n {(this.state.isExpanded || this.props.isDesktopMode) && (\r\n
    \r\n {this.props.isDesktopMode && (\r\n
    \r\n

    {this.props.product.Namn}

    \r\n
    \r\n )}\r\n\r\n
    \r\n
      \r\n {this.props.features.map((item, key) => {\r\n return (\r\n
    • \r\n \"check\"\r\n {item}\r\n
    • \r\n );\r\n })}\r\n
    \r\n\r\n {this.props.htmlFeatures &&
    }\r\n
    \r\n\r\n {this.props.isDesktopMode && (\r\n
    \r\n {this.props.product.Pris} :–\r\n
    \r\n )}\r\n\r\n
    \r\n this.props.addProduct(this.props.product)}\r\n className={this.props.canBuyProduct ? 'Product__Button--active' : 'Product__Button--disabled'}\r\n disabled={!this.props.canBuyProduct}\r\n />\r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Banner } from '../common';\r\nimport background from 'static/assets/bgbild.jpg';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ShopAssociationSelectorViewStateProps {\r\n isDesktopMode: boolean;\r\n foereningar: Array;\r\n shopFoerening?: number;\r\n translate: TranslateFunction;\r\n isInitialied: boolean;\r\n}\r\n\r\nexport interface ShopAssociationSelectorViewActionProps {\r\n clearBasket: () => void;\r\n updateFoerening: (foereningsId: number) => void;\r\n}\r\n\r\ntype ShopAssociationSelectorViewProps = ShopAssociationSelectorViewStateProps & ShopAssociationSelectorViewActionProps;\r\n\r\nexport class ShopAssociationSelectorView extends React.Component {\r\n render() {\r\n return (\r\n
    \r\n \r\n

    {this.props.translate(SitecoreDictionary.Shop.PublicShopCoreBannerTitle)}

    \r\n

    {this.props.translate(SitecoreDictionary.Shop.PublicShopCoreBannerText)}

    \r\n\r\n
    \r\n
    \r\n {\r\n this.handleChange(e);\r\n }}\r\n >\r\n \r\n {this.props.foereningar.map(foerening => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n handleChange(event: React.ChangeEvent) {\r\n this.props.updateFoerening(+event.target.value);\r\n this.props.clearBasket();\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from '../../store';\r\nimport {\r\n ShopAssociationSelectorView,\r\n ShopAssociationSelectorViewStateProps,\r\n ShopAssociationSelectorViewActionProps,\r\n} from './ShopAssociationSelectorView';\r\nimport { resetBuyBasketCommand } from 'store/basket';\r\nimport { setShopFoerening } from 'store/global/session';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\ninterface ShopAssociationSelectorViewContainerProps {\r\n isDesktopMode: boolean;\r\n}\r\n\r\nconst mapStateToProps = (\r\n state: RootState,\r\n props: ShopAssociationSelectorViewContainerProps\r\n): ShopAssociationSelectorViewStateProps => {\r\n return {\r\n foereningar: state.foereningar.read.Foereningar,\r\n isDesktopMode: props.isDesktopMode,\r\n shopFoerening: state.global.session.shopFoerening,\r\n translate: getTranslate(state.locale),\r\n isInitialied: state.initialize.read.initialized,\r\n };\r\n};\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): ShopAssociationSelectorViewActionProps => {\r\n return {\r\n clearBasket: () => dispatch(resetBuyBasketCommand()),\r\n updateFoerening: (foereningsId: number) => {\r\n dispatch(setShopFoerening(foereningsId));\r\n localStorage.setItem('SHOP_FOERENING', foereningsId.toString());\r\n },\r\n };\r\n};\r\n\r\nexport const ShopAssociationSelectorViewContainer = connect(\r\n mapStateToProps,\r\n mapActionsToProps\r\n)(ShopAssociationSelectorView);\r\n","import * as React from 'react';\r\nimport { Spinner, MainButton } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface SignatureDataProps {\r\n signatureCases?: fos.api.SignatureCase[];\r\n foereningId?: number;\r\n orderId?: number;\r\n isFetchingSignatureCases: boolean;\r\n hasFetchedSignatureCases: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface SignatureActionProps {\r\n fetchSignatures: (foereningId: number, orderId: number) => void;\r\n}\r\n\r\ntype SignatureProps = Readonly;\r\n\r\nexport class Signature extends React.Component {\r\n onFocus = (ev: FocusEvent) => {\r\n if (this.props.foereningId && this.props.orderId && !this.props.isFetchingSignatureCases) {\r\n this.props.fetchSignatures(this.props.foereningId, this.props.orderId);\r\n }\r\n };\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: SignatureDataProps) {\r\n if (\r\n newProps.foereningId &&\r\n newProps.orderId &&\r\n !newProps.isFetchingSignatureCases &&\r\n !newProps.hasFetchedSignatureCases\r\n ) {\r\n this.props.fetchSignatures(newProps.foereningId, newProps.orderId);\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('focus', this.onFocus);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('focus', this.onFocus);\r\n }\r\n\r\n getButtonTitleForSignatureCase(signatureCase: fos.api.SignatureCase) {\r\n if (!signatureCase.signed) {\r\n return this.props.translate(SitecoreDictionary.Signing.SignatureCaseNotSigned) as string;\r\n }\r\n return this.props.translate(SitecoreDictionary.Signing.SignatureCaseSigned) as string;\r\n }\r\n\r\n render() {\r\n const isLoading = !this.props.signatureCases;\r\n if (!this.props.signatureCases || this.props.signatureCases.length === 0) {\r\n return
    ;\r\n }\r\n const hasMedlemskap = this.props.signatureCases && this.props.signatureCases.some(s => !s.isAutogiro && !s.signed);\r\n const hasAutogiro = this.props.signatureCases && this.props.signatureCases.some(s => s.isAutogiro && !s.signed);\r\n return (\r\n
    \r\n {(isLoading || this.props.isFetchingSignatureCases) && }\r\n {!isLoading && !this.props.isFetchingSignatureCases && !!this.props.signatureCases && (\r\n \r\n

    {this.props.translate(SitecoreDictionary.Signing.SigningTitle)}

    \r\n
    \r\n {hasMedlemskap\r\n ? this.props.translate(SitecoreDictionary.Signing.SigningTitleMembership)\r\n : hasAutogiro\r\n ? this.props.translate(SitecoreDictionary.Signing.SigningTitleDirectDebit)\r\n : this.props.translate(SitecoreDictionary.Signing.SigningTitleAllSigned)}\r\n
    \r\n {this.props.signatureCases\r\n .filter(s => (hasMedlemskap ? !s.isAutogiro : hasAutogiro ? s.isAutogiro : false))\r\n .map(signatureCase => {\r\n return (\r\n
    \r\n window.open(signatureCase.documentUrl, '_blank')}\r\n className=\"Signature__Button\"\r\n />\r\n
    \r\n );\r\n })}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from '../../../store';\r\nimport { Signature, SignatureDataProps, SignatureActionProps } from './Signature';\r\nimport { getSignatureCases } from 'store/payment';\r\nimport { getIsFetching, FetchStatusAggregateTypes, getIsFetched } from 'store/global/fetch';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): SignatureDataProps => {\r\n const foerening = !!state.global.session.activeFoerening\r\n ? state.global.session.activeFoerening\r\n : !!state.shoppingBasket.foereningId\r\n ? state.shoppingBasket.foereningId\r\n : 0;\r\n const orderId = state.payment.read.orderId;\r\n return {\r\n signatureCases: state.payment.read.signatureCases,\r\n foereningId: foerening,\r\n orderId: orderId,\r\n isFetchingSignatureCases: getIsFetching(state.global.fetch, '' + orderId, FetchStatusAggregateTypes.SIGNATURECASE),\r\n hasFetchedSignatureCases: getIsFetched(state.global.fetch, '' + orderId, FetchStatusAggregateTypes.SIGNATURECASE),\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): SignatureActionProps => ({\r\n fetchSignatures: (foereningId: number, orderId: number) =>\r\n dispatch(getSignatureCases(foereningId, orderId.toString())),\r\n});\r\n\r\nexport const SignatureContainer = connect(mapStateToProps, mapDispatchToProps)(Signature);\r\n","import * as React from 'react';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { MainButton } from 'components/common';\r\nimport { routesMap, LocationActionTypes, getIsAdminWebMode } from 'store/location';\r\nimport { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ntype ShopNotAvailableForFoereningProps = Readonly<{\r\n translate: TranslateFunction;\r\n isAdmin: boolean;\r\n}>;\r\n\r\nconst ShopNotAvailableForFoerening: React.SFC = ({ translate, isAdmin }) => (\r\n
    \r\n

    \r\n {translate(\r\n isAdmin\r\n ? SitecoreDictionary.Shop.Admin.ShopNotAvailableForAdminTitle\r\n : SitecoreDictionary.Shop.ShopNotAvailableTitle\r\n )}\r\n

    \r\n

    \r\n {translate(\r\n isAdmin\r\n ? SitecoreDictionary.Shop.Admin.ShopNotAvailableForAdminText\r\n : SitecoreDictionary.Shop.ShopNotAvailableText\r\n )}\r\n

    \r\n \r\n \r\n \r\n
    \r\n);\r\n\r\nconst mapStateToProps = (state: RootState): ShopNotAvailableForFoereningProps => ({\r\n translate: getTranslate(state.locale),\r\n isAdmin: getIsAdminWebMode(state.location),\r\n});\r\n\r\nexport default connect(mapStateToProps, {})(ShopNotAvailableForFoerening);\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { ShopWrapperExternalDataProps, ShopWrapperDataProps, ShopWrapper, ShopWrapperActionProps } from './ShopWrapper';\r\nimport { getIsAdminWebMode } from 'store/location';\r\nimport { getProducts } from 'store/shop';\r\nimport {\r\n getIsFetching,\r\n getIsFetched,\r\n FetchStatusAggregateTypes,\r\n getIsExecuting,\r\n FetchCommandTypes,\r\n getIsExecuted,\r\n} from 'store/global/fetch';\r\nimport { setAdminError } from 'store/global/errors';\r\nimport { setOrderId } from 'store/global/session';\r\nimport { createOrder, getOrder } from './Order/Order';\r\n\r\nconst mapStateToProps = (state: RootState, props: ShopWrapperExternalDataProps): ShopWrapperDataProps => {\r\n const shopFoerening = state.global.session.shopFoerening;\r\n const foerening = !shopFoerening\r\n ? undefined\r\n : state.foereningar.read.Foereningar.find(f => f.Id.toString() === shopFoerening.toString());\r\n return {\r\n children: props.children,\r\n isDesktopMode: props.isDesktopMode,\r\n foereningAktiv: !!foerening\r\n ? getIsAdminWebMode(state.location)\r\n ? !foerening.AerButikAktiv\r\n : foerening.AerButikAktiv\r\n : undefined,\r\n shopFoerening: shopFoerening,\r\n isInitialized: state.initialize.read.initialized,\r\n isFetchingProducts: !!shopFoerening\r\n ? getIsFetching(state.global.fetch, shopFoerening, FetchStatusAggregateTypes.GET_PRODUCTS)\r\n : false,\r\n isProductsFetched: !!shopFoerening\r\n ? getIsFetched(state.global.fetch, shopFoerening, FetchStatusAggregateTypes.GET_PRODUCTS)\r\n : false,\r\n isAdmin: getIsAdminWebMode(state.location),\r\n\r\n isFetchingOrder:\r\n !!shopFoerening && !!state.global.session.orderId\r\n ? getIsFetching(state.global.fetch, state.global.session.orderId, FetchStatusAggregateTypes.GET_ORDER) ||\r\n getIsExecuting(state.global.fetch, '' + shopFoerening, FetchCommandTypes.CREATE_ORDER)\r\n : false,\r\n isOrderFetched:\r\n !!shopFoerening && !!state.global.session.orderId\r\n ? getIsFetched(state.global.fetch, state.global.session.orderId, FetchStatusAggregateTypes.GET_ORDER) ||\r\n getIsExecuted(state.global.fetch, '' + shopFoerening, FetchCommandTypes.CREATE_ORDER)\r\n : false,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): ShopWrapperActionProps => ({\r\n fetchProducts: (foereningId: number, isAdmin: boolean) => {\r\n const nonAdmin = dispatch>>(getProducts(foereningId));\r\n if (isAdmin) {\r\n nonAdmin.catch((e: Error & { __handled__: boolean }) => {\r\n e.__handled__ = true;\r\n dispatch(setAdminError(e.message));\r\n });\r\n }\r\n },\r\n setOrderId: (orderId: number) => dispatch(setOrderId(orderId)),\r\n createOrder: (foereningId: number, products: fos.api.Product[]) => createOrder(foereningId, products),\r\n getOrder: (foereningId: number, orderId: number) => getOrder(foereningId, orderId),\r\n});\r\n\r\nexport const ShopWrapperContainer = connect(mapStateToProps, mapDispatchToProps)(ShopWrapper);\r\n","import * as React from 'react';\r\nimport { ShopAssociationSelectorViewContainer } from 'components/shop/ShopAssociationSelectorViewContainer';\r\nimport ShopNotAvailableForFoerening from 'components/shop/ShopNotAvailableForFoerening';\r\nimport { Spinner } from '../common';\r\nimport { BasketRootState } from 'store/basket';\r\n\r\nexport interface ShopWrapperInternalDataProps {\r\n shopFoerening?: number;\r\n foereningAktiv?: boolean;\r\n isInitialized: boolean;\r\n isFetchingProducts: boolean;\r\n isProductsFetched: boolean;\r\n isAdmin: boolean;\r\n\r\n isFetchingOrder: boolean;\r\n isOrderFetched: boolean;\r\n}\r\n\r\nexport interface ShopWrapperExternalDataProps {\r\n children: JSX.Element;\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport type ShopWrapperDataProps = ShopWrapperExternalDataProps & ShopWrapperInternalDataProps;\r\n\r\nexport interface ShopWrapperActionProps {\r\n fetchProducts: (foereningId: number, isAdmin: boolean) => void;\r\n setOrderId: (orderId: number) => void;\r\n createOrder: (foereningId: number, products: fos.api.Product[]) => void;\r\n getOrder: (foereningId: number, orderId: number) => void;\r\n}\r\n\r\nexport const ShopWrapper: React.FunctionComponent = ({\r\n shopFoerening,\r\n foereningAktiv,\r\n isInitialized,\r\n isFetchingProducts,\r\n isProductsFetched,\r\n isAdmin,\r\n isFetchingOrder,\r\n isOrderFetched,\r\n children,\r\n isDesktopMode,\r\n fetchProducts,\r\n setOrderId,\r\n createOrder,\r\n getOrder,\r\n}) => {\r\n React.useEffect(() => {\r\n if (isInitialized && !!foereningAktiv && !!shopFoerening) {\r\n if (!isFetchingProducts && !isProductsFetched) {\r\n fetchProducts(shopFoerening, isAdmin);\r\n }\r\n }\r\n }, [isInitialized, foereningAktiv, shopFoerening, isFetchingProducts, isProductsFetched, fetchProducts, isAdmin]);\r\n\r\n React.useEffect(() => {\r\n if (isInitialized && !!foereningAktiv && !!shopFoerening) {\r\n if (!isFetchingProducts && isProductsFetched && !isFetchingOrder && !isOrderFetched) {\r\n const orderFromLocalStorage = localStorage.getItem('ORDER::' + shopFoerening);\r\n if (!!orderFromLocalStorage) {\r\n const orderId = parseInt(orderFromLocalStorage, 10);\r\n setOrderId(orderId);\r\n getOrder(shopFoerening, orderId);\r\n } else {\r\n const basketFromSessionStorage = sessionStorage.getItem('BASKET::' + shopFoerening);\r\n if (!!basketFromSessionStorage) {\r\n const basket: BasketRootState = JSON.parse(basketFromSessionStorage);\r\n createOrder(shopFoerening, basket.products);\r\n } else {\r\n createOrder(shopFoerening, []);\r\n }\r\n }\r\n }\r\n }\r\n }, [\r\n isInitialized,\r\n foereningAktiv,\r\n shopFoerening,\r\n isFetchingProducts,\r\n isProductsFetched,\r\n isFetchingOrder,\r\n isOrderFetched,\r\n setOrderId,\r\n getOrder,\r\n createOrder,\r\n ]);\r\n return (\r\n \r\n {!isInitialized && (\r\n
    \r\n \r\n
    \r\n )}\r\n {isInitialized && shopFoerening === undefined && (\r\n \r\n )}\r\n {isInitialized && shopFoerening !== undefined && foereningAktiv === undefined && (\r\n
    \r\n \r\n
    \r\n )}\r\n {isInitialized && shopFoerening !== undefined && foereningAktiv === false && }\r\n {isInitialized &&\r\n shopFoerening !== undefined &&\r\n !!foereningAktiv &&\r\n (!isProductsFetched || isFetchingProducts || !isOrderFetched || isFetchingOrder) && (\r\n
    \r\n \r\n
    \r\n )}\r\n {isInitialized &&\r\n shopFoerening !== undefined &&\r\n !!foereningAktiv &&\r\n isProductsFetched &&\r\n !isFetchingProducts &&\r\n isOrderFetched &&\r\n !isFetchingOrder &&\r\n children}\r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { Banner, MainButton, Logotyp } from 'components/common';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as Location } from 'store/location/locationActions';\r\nimport background from 'static/assets/background-login.jpg';\r\nimport { IconKvitto, IconCheckmark } from '../icons';\r\nimport { PaymentResult } from 'store/payment';\r\nimport { LocationState } from 'store/location';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { SignatureContainer } from 'components/shop';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PaymentDataProps {\r\n isDesktop: boolean;\r\n paymentSucceded?: boolean;\r\n signatureCases?: fos.api.SignatureCase[];\r\n location: LocationState;\r\n translate: TranslateFunction;\r\n foereningUrl: string;\r\n isInitialized: boolean;\r\n}\r\n\r\nexport interface PaymentActionProps {\r\n processResult: (result: PaymentResult) => void;\r\n}\r\n\r\ntype PaymentProps = PaymentDataProps & PaymentActionProps;\r\n\r\nexport class Payment extends React.Component {\r\n\r\n componentDidMount() {\r\n if (this.props.isInitialized) {\r\n this.props.processResult(this.props.location.query);\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: PaymentDataProps) {\r\n if (!prevProps.isInitialized && this.props.isInitialized) {\r\n this.props.processResult(this.props.location.query);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.props.paymentSucceded) {\r\n return null;\r\n }\r\n if (!!this.props.signatureCases && !!this.props.signatureCases.find(s => !s.signed)) {\r\n return this.renderSignatures();\r\n }\r\n return this.renderPaymentSuccess();\r\n }\r\n\r\n private renderPaymentSuccess() {\r\n return (\r\n \r\n \r\n
    \r\n \r\n
    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Receipt.ReceiptTitle)}\r\n

    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Receipt.ReceiptText)}\r\n

    \r\n \r\n
    \r\n
    \r\n {\r\n
    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Receipt.ReceiptAdditionalTitle)}\r\n

    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Receipt.ReceiptAdditionalText)}\r\n

    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n }\r\n {!!this.props.location.query.receiptid && (\r\n \r\n \r\n \r\n )}\r\n {!this.props.location.query.receiptid && !!this.props.location.query.orderid && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n }\r\n\r\n private renderSignatures() {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import { getApplicationViewModeIsDesktop } from 'store/global/ui/application-mode';\r\nimport { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { Payment, PaymentDataProps, PaymentActionProps } from './Payment';\r\nimport { processPaymentResult } from 'store/payment';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapDataToProps = (state: RootState, props: any): PaymentDataProps => {\r\n const foereningId = state.global.session.activeFoerening;\r\n const foerening = !!foereningId\r\n ? state.global.session.inloggadeFoereningar.find(x => x.Id.toString() === foereningId.toString())\r\n : undefined;\r\n return {\r\n isDesktop: getApplicationViewModeIsDesktop(state),\r\n paymentSucceded: state.payment.read.paymentSucceded,\r\n signatureCases: state.payment.read.signatureCases,\r\n location: state.location,\r\n translate: getTranslate(state.locale),\r\n foereningUrl:\r\n !!foerening && !!foerening.ExtraFoereningInfo\r\n ? foerening.ExtraFoereningInfo.ExternalUrl\r\n : 'https://www.friskissvettis.se/',\r\n isInitialized: state.initialize.read.initialized,\r\n };\r\n};\r\n\r\nconst mapActionsToProps: PaymentActionProps = {\r\n processResult: processPaymentResult,\r\n};\r\n\r\nexport const PaymentContainer = connect(mapDataToProps, mapActionsToProps)(Payment);\r\n","import { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { ReceiptDataProps, ReceiptActionProps, Receipt } from './Receipt';\r\nimport { getEntityStatus, FetchStatusAggregateTypes, EntityStatus } from 'store/global/fetch';\r\nimport { getReceipt, getReceiptForOrder } from 'store/payment';\r\nimport { getTranslate } from 'react-localize-redux';\r\n\r\nconst mapDataToProps = (state: RootState, props: any): ReceiptDataProps => {\r\n const receiptId = !!state.location.query ? state.location.query.receiptId : undefined;\r\n const orderId = !!state.location.query ? state.location.query.orderId : undefined;\r\n const foereningId = state.global.session.activeFoerening;\r\n return {\r\n receiptId,\r\n orderId,\r\n activeFoerening: foereningId,\r\n receipt: state.payment.read.receipt,\r\n fetchReceiptStatus: !!receiptId\r\n ? getEntityStatus(state.global.fetch, '' + receiptId, FetchStatusAggregateTypes.GET_RECEIPT)\r\n : !!orderId\r\n ? getEntityStatus(state.global.fetch, 'order' + orderId, FetchStatusAggregateTypes.GET_RECEIPT)\r\n : EntityStatus.INITIAL,\r\n fetchProductsStatus: !!foereningId\r\n ? getEntityStatus(state.global.fetch, foereningId, FetchStatusAggregateTypes.GET_PRODUCTS)\r\n : EntityStatus.INITIAL,\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst mapActionsToProps: ReceiptActionProps = {\r\n getReceipt,\r\n getReceiptForOrder,\r\n};\r\n\r\nexport const ReceiptContainer = connect(mapDataToProps, mapActionsToProps)(Receipt);\r\n","import * as React from 'react';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { Spinner, MainButton } from 'components/common';\r\nimport moment from 'moment';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { isApp } from 'models/app/MobileOSType';\r\nimport { lockBackgroundScroll } from 'websd/utils';\r\n\r\nexport interface ReceiptDataProps {\r\n receiptId?: number;\r\n orderId?: number;\r\n activeFoerening?: number;\r\n receipt?: fos.api.Receipt;\r\n fetchReceiptStatus: EntityStatus;\r\n fetchProductsStatus: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface ReceiptActionProps {\r\n getReceipt: (receiptId: number, foereningId: number) => void;\r\n getReceiptForOrder: (orderId: number, foereningId: number) => void;\r\n}\r\n\r\ntype ReceiptProps = ReceiptDataProps & ReceiptActionProps;\r\n\r\nexport const Receipt: React.FunctionComponent = ({\r\n receiptId,\r\n orderId,\r\n activeFoerening,\r\n receipt,\r\n fetchReceiptStatus,\r\n fetchProductsStatus,\r\n translate,\r\n getReceipt,\r\n getReceiptForOrder,\r\n}) => {\r\n React.useEffect(() => {\r\n if (\r\n !!activeFoerening &&\r\n fetchReceiptStatus !== EntityStatus.FETCHING &&\r\n fetchReceiptStatus !== EntityStatus.SUCCESS\r\n ) {\r\n if (!!receiptId) {\r\n getReceipt(receiptId, activeFoerening);\r\n } else if (!!orderId) {\r\n getReceiptForOrder(orderId, activeFoerening);\r\n }\r\n }\r\n }, [activeFoerening, fetchReceiptStatus, receiptId, orderId, getReceipt, getReceiptForOrder]);\r\n\r\n React.useEffect(() => {\r\n const unlock = lockBackgroundScroll();\r\n return () => {\r\n if (unlock) {\r\n unlock();\r\n }\r\n };\r\n }, []);\r\n\r\n const getPayedToday = () => {\r\n if (!receipt || receipt.Betalningar.length === 0) {\r\n return [];\r\n }\r\n const payed: { sum: number; type: string }[] = [];\r\n receipt.Betalningar.forEach(b => {\r\n let current = payed.find(p => p.type === b.Valuta);\r\n if (!current) {\r\n current = { sum: b.Pris, type: b.Valuta };\r\n payed.push(current);\r\n } else {\r\n current.sum += b.Pris;\r\n }\r\n });\r\n return payed;\r\n };\r\n\r\n const getTranslatedConsentName = (consentName: string) => {\r\n switch (consentName) {\r\n case 'DIRECT_DEBIT_SE':\r\n return translate(SitecoreDictionary.Receipt.SpecificReceipt.DirectDebitSe);\r\n case 'DIRECT_DEBIT_NO':\r\n return translate(SitecoreDictionary.Receipt.SpecificReceipt.DirectDebitNo);\r\n case 'RECURRING_CARD_PAYMENT':\r\n return translate(SitecoreDictionary.Receipt.SpecificReceipt.RecurringCardPayment);\r\n default:\r\n return '';\r\n }\r\n };\r\n if (fetchReceiptStatus === EntityStatus.FETCHING || fetchProductsStatus === EntityStatus.FETCHING) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n if (\r\n ((fetchReceiptStatus === EntityStatus.FAILED || fetchReceiptStatus === EntityStatus.SUCCESS) && !receipt) ||\r\n (!receiptId && !orderId)\r\n ) {\r\n return (\r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.ReceiptDetailsNotFoundTitle)}

    \r\n
    \r\n );\r\n }\r\n return (\r\n
    \r\n {!!receipt && (\r\n \r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.Title)}

    \r\n
    \r\n
    \r\n {moment(receipt.Datum).format('LLL')}\r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Date)}\r\n
    \r\n
    \r\n {receipt.Betalsaett}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.PaymentMethod)}\r\n \r\n
    \r\n
    \r\n {receipt.Kvittonummer}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.ReceiptNumber)}\r\n \r\n
    \r\n
    \r\n {receipt.Bestaellningsnummer}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.OrderNumber)}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.SellerTitle)}

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

    {receipt.Saeljare.FoereningNamn}

    \r\n

    {receipt.Saeljare.Adress.Gata}

    \r\n

    \r\n {receipt.Saeljare.Adress.Postnummer} {receipt.Saeljare.Adress.Stad}\r\n

    \r\n

    {receipt.Saeljare.Adress.Land}

    \r\n {!!receipt.Saeljare.Adress.CareOf &&

    {'c/o ' + receipt.Saeljare.Adress.CareOf}

    }\r\n
    \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.SellerInfo)}\r\n
    \r\n
    \r\n {receipt.Saeljare.Email}\r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Email)}\r\n
    \r\n
    \r\n {receipt.Saeljare.Url}\r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Homepage)}\r\n
    \r\n
    \r\n {receipt.Saeljare.Telefonnummer}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.PhoneNumber)}\r\n \r\n
    \r\n
    \r\n {receipt.Saeljare.Organisationsnummer}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.OrganisationId)}\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.BuyerTitle)}

    \r\n
    \r\n
    \r\n \r\n {receipt.Koepare.Foernamn} {receipt.Koepare.Efternamn}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.BuyerTitle)}\r\n
    \r\n
    \r\n {receipt.Koepare.Email}\r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Email)}\r\n
    \r\n
    \r\n
    \r\n

    {receipt.Koepare.Adress.Gata}

    \r\n

    \r\n {receipt.Koepare.Adress.Postnummer} {receipt.Koepare.Adress.Stad}\r\n

    \r\n

    {receipt.Koepare.Adress.Land}

    \r\n {!!receipt.Koepare.Adress.CareOf &&

    {'c/o ' + receipt.Koepare.Adress.CareOf}

    }\r\n
    \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Address)}\r\n
    \r\n
    \r\n {receipt.Koepare.Telefonnummer}\r\n \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.PhoneNumber)}\r\n \r\n
    \r\n
    \r\n
    \r\n {receipt.Autogiromedgivanden.length > 0 && (\r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.DirectDebitConsentTitle)}

    \r\n
    \r\n {receipt.Autogiromedgivanden.map(m => {\r\n return (\r\n
    \r\n {m.Id}\r\n {getTranslatedConsentName(m.Namn)}\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )}\r\n
    \r\n

    {translate(SitecoreDictionary.Receipt.SpecificReceipt.ProductsTitle)}

    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {receipt.Produkter.map(p => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {!!p.Kupong && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n
    \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Product)}\r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.Amount)}{translate(SitecoreDictionary.Receipt.SpecificReceipt.Total)}
    {p.ProduktNamn}{p.Antal}\r\n {p.Pris + (!!p.Kupong ? p.Kupong.Pris : 0)} {p.Valuta}\r\n
    \r\n {(translate(SitecoreDictionary.Receipt.SpecificReceipt.CouponCode) as string).replace(\r\n '$',\r\n p.Kupong.Namn\r\n )}\r\n 1\r\n -{p.Kupong.Pris} {p.Valuta}\r\n
    \r\n
    \r\n
    \r\n
    {translate(SitecoreDictionary.Receipt.SpecificReceipt.Sum)}
    \r\n
    \r\n {receipt.Pris} {receipt.Valuta}\r\n
    \r\n
    \r\n {receipt.Momssatser.map(m => {\r\n return (\r\n
    \r\n
    \r\n {(translate(SitecoreDictionary.Receipt.SpecificReceipt.IncludingVAT) as string).replace(\r\n '$',\r\n m.Procent\r\n )}\r\n
    \r\n
    \r\n {m.Pris} {m.Valuta}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n
    \r\n
    \r\n {translate(SitecoreDictionary.Receipt.SpecificReceipt.PayedToday)}\r\n
    \r\n
    \r\n {getPayedToday().map(b => {\r\n return (\r\n \r\n {b.sum} {b.type}\r\n \r\n );\r\n })}\r\n
    \r\n
    \r\n {receipt.Betalningar.map((b, index) => {\r\n return (\r\n
    \r\n
    {b.Betalmetod}
    \r\n
    \r\n {b.Pris} {b.Valuta}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n
    \r\n )}\r\n {!isApp() && (\r\n
    \r\n window.print()}\r\n title={translate(SitecoreDictionary.Receipt.SpecificReceipt.PrintButton) as string}\r\n />\r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\n// import { DayPicker } from 'components/common';\r\nimport { Day } from 'models';\r\n\r\nimport { BookingItemContainer } from 'components/common';\r\nimport { DayViewObject } from 'models/Day';\r\nimport { getDateTextForView } from 'websd/utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface DayDataProps {\r\n readonly days: DayViewObject;\r\n readonly day: Day;\r\n readonly translate: TranslateFunction;\r\n}\r\n\r\ninterface DayActionProps {\r\n readonly updateBookingDayExpanded: (dayName: string, expanded: boolean) => void;\r\n}\r\n\r\ntype DayProps = DayDataProps & DayActionProps;\r\n\r\nexport const BookingDayItem: React.SFC = (props: DayProps) => (\r\n
    \r\n
    {getDateTextForView(props.day.date)}
    \r\n {props.day.items.map(pass => (\r\n \r\n ))}\r\n
    \r\n);\r\n","import * as React from 'react';\r\nimport { BookingDayItem } from './day';\r\n\r\nimport { DayViewObject } from 'models/Day';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface BookingListDataProps {\r\n days: DayViewObject;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface BookingListActionProps {\r\n updateBookingDayExpanded: (dayName: string, expanded: boolean) => void;\r\n}\r\n\r\ntype BookingListProps = Readonly;\r\n\r\nexport const BookingList: React.SFC = props => {\r\n const { days, translate, updateBookingDayExpanded } = props;\r\n const dayKeys = Object.keys(days);\r\n return (\r\n
    \r\n {dayKeys.map(d => (\r\n \r\n ))}\r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { BookingList } from './booking-list';\r\n\r\nimport { DayViewObject } from '../../models/Day';\r\nimport BookingRulesContainer from 'components/bookingRules';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { PassListSkeleton } from '../common/pass-list-skeleton/PassListSkeleton';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface BookingsDataProps {\r\n readonly days: DayViewObject;\r\n readonly isFetching: boolean;\r\n translate: TranslateFunction;\r\n isFullDesktopView?: boolean;\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface BookingsActionProps {\r\n readonly updateBookingDayExpanded: (dayName: string, expanded: boolean) => void;\r\n readonly onGetBookings: () => void;\r\n}\r\n\r\ntype BookingsProps = BookingsDataProps & BookingsActionProps;\r\n\r\nexport class Bookings extends React.Component {\r\n private readonly containerClassName: string = 'Bookings__PassListContainer';\r\n\r\n componentDidMount() {\r\n this.props.onGetBookings();\r\n }\r\n\r\n getClasses(): string {\r\n const baseClass = 'Schedule Schedule--MyBooking';\r\n let scheduleClasses = '' + baseClass;\r\n if (this.props.isFullDesktopView) {\r\n scheduleClasses = scheduleClasses + ' Schedule--Is-Desktop-Full-View-Mode';\r\n } else {\r\n scheduleClasses = scheduleClasses + ' Schedule--Is-Mobile-Mode';\r\n }\r\n return scheduleClasses;\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n\r\n {!this.props.isFetching && Object.keys(this.props.days).length < 1 && (\r\n
    {this.props.translate(SitecoreDictionary.Bookings.NothingBooked)}
    \r\n )}\r\n\r\n
    \r\n {this.props.isFetching && }\r\n\r\n {!this.props.isFetching && (\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { Bookings, BookingsDataProps, BookingsActionProps } from './Bookings';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { updateBookingDayExpanded, getBookingsInBackground } from 'store/bokningar';\r\nimport { FetchStatusAggregateTypes, getIsFetching } from 'store/global/fetch';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): BookingsDataProps => {\r\n return {\r\n days: state.bokningar.days,\r\n translate: getTranslate(state.locale),\r\n isFullDesktopView: props.isFullDesktopView,\r\n isDesktopMode: props.isDesktopMode,\r\n isFetching: getIsFetching(\r\n state.global.fetch,\r\n state.global.session.userId as number,\r\n FetchStatusAggregateTypes.BOKNING\r\n ),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): BookingsActionProps => ({\r\n onGetBookings: () => dispatch(getBookingsInBackground()),\r\n updateBookingDayExpanded: (day, expanded) => dispatch(updateBookingDayExpanded(day, expanded)),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Bookings);\r\n","import * as React from 'react';\r\nimport { Notification } from './Notification';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { Spinner } from '../common/Spinner';\r\n\r\nexport interface NotificationsDataProps {\r\n notifications: Array;\r\n fetchState?: EntityStatus;\r\n newNotificationsCount?: number;\r\n}\r\n\r\nexport interface NotificationsActionProps {\r\n fetchNotifications: () => void;\r\n}\r\n\r\nexport interface NotificationsState {}\r\n\r\ntype NotificationsProps = NotificationsDataProps & NotificationsActionProps;\r\n\r\nexport class Notifications extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.fetchNotifications();\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: NotificationsProps) {\r\n if (this.props.newNotificationsCount !== newProps.newNotificationsCount) {\r\n newProps.fetchNotifications();\r\n }\r\n }\r\n\r\n render() {\r\n if (this.props.fetchState === EntityStatus.FETCHING) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n } else {\r\n return (\r\n
    \r\n {this.props.notifications.map(x => (\r\n \r\n ))}\r\n
    \r\n );\r\n }\r\n }\r\n}\r\n","import { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { Notifications, NotificationsActionProps, NotificationsDataProps } from './Notifications';\r\nimport { getEntityStatus, FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { fetchNotifications } from 'store/notifications';\r\n\r\nconst mapState = (state: RootState): NotificationsDataProps => ({\r\n notifications: state.notifications.notifications,\r\n fetchState: getEntityStatus(\r\n state.global.fetch,\r\n state.global.session.userId as number,\r\n FetchStatusAggregateTypes.NOTIFICATIONS\r\n ),\r\n newNotificationsCount: state.global.ui.newNotification.newNotificationsCount,\r\n});\r\n\r\nconst mapDispatch: NotificationsActionProps = {\r\n fetchNotifications,\r\n};\r\n\r\nexport default connect(mapState, mapDispatch)(Notifications);\r\n","import * as React from 'react';\r\nimport CountUp from 'react-countup';\r\n\r\ninterface SideBySideStatisticsProps {\r\n dataValue1: number;\r\n dataValue2: number;\r\n mainTitle: string;\r\n title1: string;\r\n title2: string;\r\n}\r\n\r\nexport class SideBySideStatistics extends React.Component {\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n

    {this.props.mainTitle}

    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    {this.props.title1}
    \r\n
    \r\n\r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n
    {this.props.title2}
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport CountUp from 'react-countup';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface ListOfStatisticsProps {\r\n data?: fos.api.TrainingStatisticsWorkoutType[];\r\n mainTitle: string;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport class ListOfStatistics extends React.Component {\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n if (!this.props.data || this.props.data.length === 0) {\r\n return
    ;\r\n } else {\r\n return (\r\n
    \r\n

    {this.props.mainTitle}

    \r\n\r\n \r\n {this.props.data.map(x => (\r\n \r\n \r\n \r\n \r\n ))}\r\n
    \r\n \r\n \r\n {x.WorkoutName\r\n ? x.WorkoutName\r\n : this.props.translate(SitecoreDictionary.Statistics.DefaultValueGym).toString()}\r\n
    \r\n
    \r\n );\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SideBySideStatistics } from './SideBySideStatistics';\r\nimport { ListOfStatistics } from './ListOfStatistics';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { Spinner } from '../common/Spinner';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface StatisticsDataProps {\r\n statistics: fos.api.TrainingStatistics;\r\n fetchState?: EntityStatus;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface StatisticsActionProps {\r\n fetchTraeningsstatistik: () => void;\r\n}\r\n\r\ntype StatisticsProps = StatisticsDataProps & StatisticsActionProps;\r\n\r\nexport class Statistics extends React.Component {\r\n componentDidMount() {\r\n this.props.fetchTraeningsstatistik();\r\n }\r\n\r\n render() {\r\n if (this.props.fetchState === EntityStatus.FETCHING) {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n } else {\r\n return (\r\n
    \r\n \r\n \r\n \r\n\r\n \r\n
    \r\n );\r\n }\r\n }\r\n}\r\n","import { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { Statistics, StatisticsActionProps, StatisticsDataProps } from './statistics';\r\nimport { getEntityStatus, FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { fetchTraeningsstatistik } from 'store/statistics';\r\n\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapState = (state: RootState): StatisticsDataProps => ({\r\n statistics: state.statistics.read.Statistics,\r\n fetchState: getEntityStatus(state.global.fetch, -1, FetchStatusAggregateTypes.TRAENINGSSTATISTIK),\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nconst mapDispatch: StatisticsActionProps = {\r\n fetchTraeningsstatistik,\r\n};\r\n\r\nexport default connect(mapState, mapDispatch)(Statistics);\r\n","import { fetched, fetching, FetchStatusAggregateTypes, fetchedFailed } from 'store/global/fetch';\r\nimport { api } from 'api';\r\nimport { Dispatch } from 'store';\r\nimport { Action } from 'redux';\r\nimport { getTraeningsstatistik } from './read';\r\n\r\nexport const fetchTraeningsstatistik = () => (dispatch: Dispatch) => {\r\n dispatch(fetching(-1, FetchStatusAggregateTypes.TRAENINGSSTATISTIK));\r\n let url = `Traeningsstatistik/GetTraeningsstatistik`;\r\n let promise = api.get(url, {\r\n muteErrorNotificationOnStatus: [403],\r\n });\r\n promise.then(result => {\r\n if (!result.error) {\r\n let statistics: fos.api.TrainingStatistics = result.result;\r\n dispatch(getTraeningsstatistik(statistics));\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.TRAENINGSSTATISTIK, statistics));\r\n } else {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.TRAENINGSSTATISTIK));\r\n }\r\n });\r\n return promise;\r\n};\r\n","import * as React from 'react';\r\n\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as Location } from 'store/location/locationActions';\r\nimport { MainButton, Logotyp, NewPassword, Banner } from 'components/common';\r\nimport { StatusBar } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Spinner } from 'components/common/Spinner';\r\nimport background from 'static/assets/background-login.jpg';\r\nimport { LocationState } from 'store/location';\r\nimport { constructSafeName } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ResetPasswordDataProps {\r\n token?: string;\r\n foerening?: string;\r\n newPassword: string;\r\n repeatNewPassword: string;\r\n isNewPasswordValid: boolean;\r\n isRepeatNewPasswordValid: boolean;\r\n resetSuccess?: boolean;\r\n resetErrorCode?: string;\r\n isExecuting?: boolean;\r\n translate: TranslateFunction;\r\n anlaeggningar: Array;\r\n location: LocationState;\r\n}\r\n\r\nexport interface ResetPasswordActionProps {\r\n resetPassword: (model: fos.api.ResetPasswordRequest) => void;\r\n setNewPassword: (value: string) => void;\r\n setRepeatNewPassword: (value: string) => void;\r\n setIsNewPasswordValid: (isValid: boolean) => void;\r\n setIsRepeatNewPasswordValid: (isValid: boolean) => void;\r\n clearResetPassword: () => void;\r\n logout: (gotoLogin: boolean) => void;\r\n gotoLogin: () => void;\r\n}\r\n\r\nexport type ResetPasswordComponentProps = ResetPasswordActionProps & ResetPasswordDataProps;\r\n\r\nexport class ResetPassword extends React.Component {\r\n errorStatusClass = 'StatusMessage--BlackRoundedCorners';\r\n\r\n componentDidMount() {\r\n if (!this.props.token) {\r\n this.props.gotoLogin();\r\n }\r\n this.props.logout(false);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.clearResetPassword();\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n
    \r\n {this.props.isExecuting && }\r\n {!this.props.isExecuting && (\r\n
    this.submit(event)}>\r\n
    \r\n
    \r\n {!this.props.resetSuccess && (\r\n \r\n )}\r\n \r\n {!this.props.resetSuccess && (\r\n \r\n )}\r\n \r\n {this.props.translate(SitecoreDictionary.ResetPassword.Login) as string}\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private shouldDisableSubmit(): boolean {\r\n return (\r\n !this.props.token ||\r\n !this.props.isNewPasswordValid ||\r\n !this.props.isRepeatNewPasswordValid ||\r\n this.props.resetSuccess ||\r\n !!this.props.isExecuting\r\n );\r\n }\r\n\r\n private submit(event: React.FormEvent) {\r\n event.preventDefault();\r\n if (this.props.token && this.props.newPassword) {\r\n this.props.resetPassword({\r\n Token: this.props.token,\r\n NewPassword: this.props.newPassword,\r\n Foerening: !!this.props.foerening ? constructSafeName(this.props.foerening.toLowerCase()) : '',\r\n });\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { ResetPassword, ResetPasswordDataProps, ResetPasswordActionProps } from './ResetPassword';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getIsExecuted, FetchCommandTypes, getIsExecuting } from 'store/global/fetch';\r\nimport {\r\n resetPassword,\r\n setNewPassword,\r\n setRepeatNewPassword,\r\n setIsNewPasswordValid,\r\n setIsRepeatNewPasswordValid,\r\n doClearPasswordResetState,\r\n} from 'store/global/passwordReset';\r\nimport { logout } from 'store/auth';\r\nimport { switchView } from 'store/location';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): ResetPasswordDataProps => ({\r\n location: state.location,\r\n anlaeggningar: state.anlaeggningar.read.sitecoreAnlaeggningar,\r\n translate: getTranslate(state.locale),\r\n token: state.location && state.location.query ? state.location.query.token : undefined,\r\n foerening: state.location && state.location.query ? state.location.query.foerening : undefined,\r\n newPassword: state.global.passowrdReset.newPassword,\r\n repeatNewPassword: state.global.passowrdReset.repeatNewPassword,\r\n isNewPasswordValid: state.global.passowrdReset.isNewPasswordValid,\r\n isRepeatNewPasswordValid: state.global.passowrdReset.isRepeatNewPassword,\r\n resetSuccess:\r\n state.location && state.location.query && state.location.query.token\r\n ? getIsExecuted(state.global.fetch, state.location.query.token as string, FetchCommandTypes.RESET_LOESENORD)\r\n : undefined,\r\n isExecuting:\r\n state.location && state.location.query && state.location.query.token\r\n ? getIsExecuting(state.global.fetch, state.location.query.token as string, FetchCommandTypes.RESET_LOESENORD)\r\n : undefined,\r\n resetErrorCode: state.global.passowrdReset.passwordResetErrorCode,\r\n});\r\n\r\nconst mapDispatchToProps: ResetPasswordActionProps = {\r\n resetPassword,\r\n setNewPassword,\r\n setRepeatNewPassword,\r\n setIsNewPasswordValid,\r\n setIsRepeatNewPasswordValid,\r\n logout,\r\n gotoLogin: switchView,\r\n clearResetPassword: doClearPasswordResetState,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ResetPassword);\r\n","import * as React from 'react';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { MainButton } from '../common';\r\n\r\nimport { Spinner } from '../common/Spinner';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface BokningStatusDataProps {\r\n statusMessage?: string;\r\n isLoading: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\ninterface BokningStatusPopupState {\r\n statusMessage?: string;\r\n}\r\n\r\nexport class BokningStatusPopup extends React.Component {\r\n constructor(props: BokningStatusDataProps) {\r\n super(props);\r\n this.state = {\r\n statusMessage: props.statusMessage,\r\n };\r\n }\r\n\r\n componentDidUpdate() {\r\n if (!!this.props.statusMessage && this.state.statusMessage !== this.props.statusMessage) {\r\n this.setState({ ...this.state, statusMessage: this.props.statusMessage });\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n
    \r\n {this.props.isLoading && }\r\n {!this.props.isLoading && {this.getStatusMessage()}}\r\n
    \r\n
    \r\n
    {this.props.translate(SitecoreDictionary.Schedule.PublicWeb.MittFriskisHeader)}
    \r\n\r\n
    \r\n this.sendEventToSitecore()}\r\n />\r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private sendEventToSitecore() {\r\n window.parent.postMessage('GotoMittFriskis', process.env.REACT_APP_FOS_URL as string);\r\n }\r\n\r\n private getStatusMessage() {\r\n return this.state.statusMessage ? this.props.translate(this.state.statusMessage) : false;\r\n }\r\n\r\n private getStatusClass() {\r\n if (\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.OK_BOOK ||\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.QUEUED ||\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return 'BokningStatusPopup__Status BokningStatusPopup__Status--Ok';\r\n } else {\r\n return 'BokningStatusPopup__Status BokningStatusPopup__Status--Error';\r\n }\r\n }\r\n private getStatusClassSmall() {\r\n if (\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.OK_BOOK ||\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.QUEUED ||\r\n this.state.statusMessage === SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return 'BokningStatusPopup__Content--booking-ok';\r\n } else {\r\n return 'BokningStatusPopup__Content--error';\r\n }\r\n }\r\n}\r\n","import { FetchCommandTypes, getIsExecuting } from 'store/global/fetch';\r\nimport { BokningStatusPopup, BokningStatusDataProps } from './BokningStatusPopup';\r\nimport { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { getTranslate } from 'store/global/dictionary/dictionary';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): BokningStatusDataProps => {\r\n return {\r\n statusMessage: getMessage(state, props.passId, props.passDay),\r\n isLoading: getIsExecuting(state.global.fetch, props.passId, FetchCommandTypes.BOKA_PASS),\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nconst getMessage = (state: RootState, id: number | string, passDay: string) => {\r\n const day = state.pass.read.days.find(d => d.key === passDay);\r\n if (!day) {\r\n return undefined;\r\n }\r\n const pass = day.items.find(p => p.PassId === id);\r\n return pass ? pass.statusMessage : undefined;\r\n};\r\n\r\nexport const BokningStatusPopupContainer = connect(mapStateToProps)(BokningStatusPopup);\r\n","import * as React from 'react';\r\nimport LoginContainer from 'components/login/LoginContainer';\r\nimport { BokningStatusPopupContainer } from 'components/publicSchedulePopup/BokningStatusPopupContainer';\r\n\r\nimport { SitecoreDictionary, BokningsStatusEnum } from 'models';\r\nimport { IconBigClose } from 'components/icons';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface PublicSchedulePopupDataProps {\r\n isAuthenticated?: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface PublicSchedulePopupPassedProps {\r\n pass: fos.api.Pass;\r\n passDay: string;\r\n closePopup: () => void;\r\n // visible: boolean;\r\n showAtStart: boolean;\r\n}\r\n\r\nexport interface PublicSchedulePopupActionProps {}\r\nexport interface PublicSchedulePopupStateProps {\r\n hiddenFromStart: boolean;\r\n}\r\n\r\nexport type PublicSchedulePopupProps = PublicSchedulePopupDataProps &\r\n PublicSchedulePopupActionProps &\r\n PublicSchedulePopupPassedProps;\r\nexport class PublicSchedulePopup extends React.Component {\r\n constructor(props: PublicSchedulePopupProps) {\r\n super(props);\r\n\r\n this.state = {\r\n hiddenFromStart: true,\r\n };\r\n }\r\n\r\n getClasses() {\r\n let myClasses = 'PublicSchedulePopup';\r\n return myClasses;\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n {this.props.isAuthenticated ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { PublicSchedulePopupDataProps, PublicSchedulePopup } from './PublicSchedulePopup';\r\nimport { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): PublicSchedulePopupDataProps => {\r\n return {\r\n isAuthenticated: state.auth.read.isAuthenticated,\r\n translate: getTranslate(state.locale),\r\n };\r\n};\r\n\r\nexport const PublicSchedulePopupContainer = connect(mapStateToProps)(PublicSchedulePopup);\r\n// https://website.local:3000/public/schedule?foerening=stockholm\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\n\r\nimport { goToSchedule, goBack } from 'store/location';\r\nimport {\r\n SideBarAction,\r\n SidebarStatus,\r\n SidebarContentType,\r\n SidebarSize,\r\n showSideBarInFullDesktopWidth,\r\n} from 'store/global/ui/side-bar';\r\nimport {\r\n ScheduleLauncherDataProps,\r\n ScheduleLauncherActionProps,\r\n ScheduleLauncher,\r\n ScheduleLauncherExternalDataProps,\r\n} from './ScheduleLauncher';\r\nimport { UIScheduleAction, UIScheduleActionType } from 'store/global/ui/schedule';\r\nimport { UIScheduleViewType } from 'store/global/ui/schedule/uiScheduleReducer';\r\n\r\nconst setSidebarToContainSchedule = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_CONTENT_TYPE',\r\n contentType: SidebarContentType.SCHEDULE,\r\n });\r\n};\r\nconst setSidebarToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_LAUNCH',\r\n visibility: SidebarStatus.SHOWING,\r\n });\r\n};\r\nconst setSidebarToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_HIDE',\r\n visibility: SidebarStatus.HIDDEN,\r\n });\r\n};\r\nconst setSidebarToMaximised = (isSideBarMaximised: boolean) => (dispatch: Dispatch) => {\r\n if (!isSideBarMaximised) {\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MAXIMISED',\r\n size: SidebarSize.MAXIMISED,\r\n });\r\n }\r\n};\r\nexport const setSidebarToMinimised =\r\n (isSideBarMaximised: boolean) => (dispatch: Dispatch) => {\r\n if (isSideBarMaximised) {\r\n // Vi vill att detta endast ska ske för desktop, men detta körs endast för desktop, så....\r\n dispatch(goBack());\r\n\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MINIMISED',\r\n size: SidebarSize.MINIMISED,\r\n });\r\n // Change the selected icon to show ListView as highlighted\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToList,\r\n viewShowing: UIScheduleViewType.LISTVIEW,\r\n });\r\n }\r\n };\r\n\r\nconst mapStateToProps = (state: RootState, props: ScheduleLauncherExternalDataProps): ScheduleLauncherDataProps => {\r\n const expanded = state.global.ui.scheduleFilter.expanded;\r\n return {\r\n expanded: expanded,\r\n sideBarState: state.global.ui.sideBar,\r\n isSideBarMaximised: showSideBarInFullDesktopWidth(state.global.ui.sideBar, state.global.ui.schedule),\r\n\r\n ...props,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: ScheduleLauncherActionProps = {\r\n setSidebarToContainSchedule: setSidebarToContainSchedule,\r\n setSidebarToVisible: setSidebarToVisible,\r\n setSidebarToHidden: setSidebarToHidden,\r\n setSidebarToMaximised: setSidebarToMaximised,\r\n setSidebarToMinimised: setSidebarToMinimised,\r\n goToSchedule,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ScheduleLauncher);\r\n","import * as React from 'react';\r\nimport { SideBarState, SidebarStatus } from 'store/global/ui/side-bar/sideBarReducer';\r\n\r\n// import calendar from '../../static/assets/icon-calender.svg';\r\n// import close from '../../static/assets/converted-to-components/icon-big-close.svg';\r\nimport { IconCross, IconCalendar } from 'components/icons';\r\n\r\nexport interface ScheduleLauncherInternalDataProps {\r\n readonly expanded: boolean;\r\n readonly sideBarState: SideBarState;\r\n readonly isSideBarMaximised: boolean;\r\n}\r\n\r\nexport interface ScheduleLauncherExternalDataProps {\r\n readonly isDesktopMode: boolean;\r\n}\r\n\r\nexport interface ScheduleLauncherActionProps {\r\n setSidebarToContainSchedule: () => void;\r\n setSidebarToVisible: () => void;\r\n setSidebarToHidden: () => void;\r\n setSidebarToMaximised: (isSideBarMaximised: boolean) => void;\r\n setSidebarToMinimised: (isSideBarMaximised: boolean) => void;\r\n goToSchedule: () => void;\r\n}\r\n\r\nexport type ScheduleLauncherDataProps = ScheduleLauncherInternalDataProps & ScheduleLauncherExternalDataProps;\r\nexport type ScheduleLauncherProps = ScheduleLauncherDataProps & ScheduleLauncherActionProps;\r\n\r\nexport const ScheduleLauncher: React.FunctionComponent = ({\r\n expanded,\r\n sideBarState,\r\n isDesktopMode,\r\n isSideBarMaximised,\r\n setSidebarToContainSchedule,\r\n setSidebarToVisible,\r\n setSidebarToHidden,\r\n setSidebarToMaximised,\r\n setSidebarToMinimised,\r\n goToSchedule,\r\n}) => {\r\n const getClasses = (): string => {\r\n const baseClass = 'ScheduleLauncher';\r\n let scheduleClasses = baseClass;\r\n if (sideBarState.visibility === SidebarStatus.SHOWING) {\r\n scheduleClasses = scheduleClasses + ` ${baseClass}--when-Sidebar-Is-Showing`;\r\n if (expanded) {\r\n scheduleClasses = scheduleClasses + ' schedulefilter-is-expanded';\r\n }\r\n }\r\n if (isSideBarMaximised) {\r\n scheduleClasses = scheduleClasses + ` ${baseClass}--when-Sidebar-Is-Maximised`; // expanded\r\n }\r\n return scheduleClasses;\r\n };\r\n const getIcon = () => {\r\n if (sideBarState.visibility === SidebarStatus.HIDDEN) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n };\r\n const setIconClass = (): string => {\r\n if (sideBarState.visibility === SidebarStatus.HIDDEN) {\r\n return 'ScheduleLauncher__LogoImage--calendar';\r\n } else {\r\n return 'ScheduleLauncher__LogoImage--close';\r\n }\r\n };\r\n const onScheduleIconClick = () => {\r\n const sideBarIsShowing = sideBarState.visibility === SidebarStatus.SHOWING;\r\n if (!sideBarIsShowing) {\r\n if (isDesktopMode) {\r\n setSidebarToContainSchedule();\r\n setSidebarToVisible();\r\n } else {\r\n goToSchedule();\r\n }\r\n } else {\r\n if (isDesktopMode) {\r\n if (!isSideBarMaximised) {\r\n setSidebarToHidden();\r\n } else {\r\n setSidebarToMinimised(isSideBarMaximised);\r\n }\r\n }\r\n }\r\n };\r\n\r\n React.useEffect(() => {\r\n if (!isDesktopMode && sideBarState.visibility === SidebarStatus.SHOWING) {\r\n setSidebarToHidden();\r\n goToSchedule();\r\n setSidebarToMinimised(isSideBarMaximised);\r\n }\r\n }, [isDesktopMode, sideBarState, setSidebarToHidden, goToSchedule, setSidebarToMinimised, isSideBarMaximised]);\r\n\r\n return (\r\n
    \r\n
    onScheduleIconClick()}>\r\n {getIcon()}\r\n
    \r\n
    \r\n );\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { PassItemDataProps, PassItemInternalDataProps, PassItemActionProps, PassItem } from '../pass-item';\r\nimport { FetchCommandTypes, getCommandStatus } from 'store/global/fetch';\r\nimport { getIsPublicWebMode } from 'store/location';\r\nimport { UIScheduleViewType } from 'store/global/ui/schedule';\r\nimport { scheduleAvbokaPass } from 'store/bokningar';\r\nimport { bokaPass } from 'store/pass';\r\nimport { disableBokaPass, allowBokaPass } from 'store/global/ui/sitecore/sitecoreActions';\r\nimport { closeSideBar } from 'store/global/ui/side-bar';\r\nimport { setSidebarToMinimised } from 'components/common/ScheduleLauncher';\r\n\r\nconst mapState = (state: RootState, props: PassItemInternalDataProps): PassItemDataProps => {\r\n const passInDay = state.pass.read.days.find(d => d.key === props.passDay);\r\n const passItem = !!passInDay ? passInDay.items.find(p => p.PassId === props.passId) : undefined;\r\n\r\n return {\r\n pass: passItem,\r\n bokaStatus: getCommandStatus(state.global.fetch, props.passId, FetchCommandTypes.BOKA_PASS),\r\n avbokaStatus: getCommandStatus(state.global.fetch, props.passId, FetchCommandTypes.AVBOKA_PASS),\r\n bokningar: state.bokningar.bokningar,\r\n isPublicWebMode: getIsPublicWebMode(state.location),\r\n isAuthenticated: state.auth.read.isAuthenticated as boolean,\r\n allowBokaPassFromSitecore: state.global.ui.sitecore.allowBokaPass,\r\n selectedPass: state.global.ui.schedule.selectedPass,\r\n isWeekView: state.global.ui.schedule.viewShowing === UIScheduleViewType.WEEKVIEW,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: PassItemActionProps = {\r\n bokaPass: bokaPass,\r\n scheduleAvbokaPass: scheduleAvbokaPass,\r\n disableBokaPass: disableBokaPass,\r\n allowBokaPass: allowBokaPass,\r\n closeSchedule: setSidebarToMinimised,\r\n closeSideBar: closeSideBar,\r\n};\r\n\r\nexport default connect(mapState, mapDispatchToProps)(PassItem);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { CSSTransition } from 'react-transition-group';\r\n\r\nimport { StatusBar, ConfirmationTextBox, IconButton } from 'components/common';\r\nimport { SitecoreDictionary, SitecorePlaceholder, BokningsStatusEnum } from 'models';\r\nimport { NavLink } from 'redux-first-router-link';\r\nimport { passDetailsRouteAction } from 'store/location';\r\nimport { PublicSchedulePopupContainer } from 'components/publicSchedulePopup';\r\nimport { getDateTextForView } from 'websd/utils';\r\nimport { IconInformation } from 'components/icons';\r\nimport { Info } from '../../../pass-details/Info';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { CommandStatus } from 'store/global/fetch';\r\n\r\nexport interface PassItemInternalDataProps {\r\n passId: string;\r\n translate: TranslateFunction;\r\n aktivFoerening: number;\r\n baseClass: string;\r\n isDesktopMode: boolean;\r\n passDay: string;\r\n}\r\n\r\nexport interface PassItemDataProps {\r\n pass?: fos.api.Pass;\r\n bokaStatus: CommandStatus;\r\n avbokaStatus: CommandStatus;\r\n bokningar: Array;\r\n isPublicWebMode: boolean;\r\n readonly isAuthenticated: boolean;\r\n readonly allowBokaPassFromSitecore: boolean;\r\n readonly selectedPass?: fos.api.Pass;\r\n readonly isWeekView: boolean;\r\n}\r\n\r\nexport interface PassItemActionProps {\r\n bokaPass: (pass: fos.api.Pass, bokaKoePlats: boolean) => void;\r\n scheduleAvbokaPass: (payload: fos.api.CancelPayload, passId: string, key: string) => void;\r\n disableBokaPass: () => void;\r\n allowBokaPass: () => void;\r\n closeSchedule: (close: boolean) => void;\r\n closeSideBar: () => void;\r\n}\r\n\r\nconst renderWithMaxLength = (input: string, maxLength: number) => {\r\n if (!input) {\r\n return '';\r\n } else {\r\n return input.length > maxLength ? input.substr(0, maxLength - 3) + '...' : input;\r\n }\r\n};\r\n\r\ntype PassItemProps = PassItemDataProps & PassItemActionProps & PassItemInternalDataProps;\r\n\r\nexport const PassItem: React.FunctionComponent = ({\r\n aktivFoerening,\r\n allowBokaPass,\r\n allowBokaPassFromSitecore,\r\n baseClass,\r\n bokaPass,\r\n bokningar,\r\n bokaStatus,\r\n avbokaStatus,\r\n closeSchedule,\r\n closeSideBar,\r\n disableBokaPass,\r\n isAuthenticated,\r\n isDesktopMode,\r\n isPublicWebMode,\r\n isWeekView,\r\n passDay,\r\n scheduleAvbokaPass,\r\n translate,\r\n pass,\r\n selectedPass,\r\n}) => {\r\n const okStatusClass = 'StatusMessage--Green';\r\n const errorStatusClass = 'StatusMessage--Black';\r\n const NotBookable = [\r\n BokningsStatusEnum.EJ_BOKNINGSBART_DATE_DROPIN as string,\r\n BokningsStatusEnum.FOERSENT_FOER_ATT_BOKA as string,\r\n BokningsStatusEnum.FOERTIDIGT_FOER_ATT_BOKA as string,\r\n BokningsStatusEnum.FULLT as string,\r\n BokningsStatusEnum.FULLT_DROPIN as string,\r\n BokningsStatusEnum.DROPIN as string,\r\n BokningsStatusEnum.INSTAELLD as string,\r\n ];\r\n\r\n const [statusMessageVisible, setStatusMessageVisible] = React.useState(false);\r\n const [statusMessageText, setStatusMessageText] = React.useState('');\r\n const [confirmationVisible, setConfirmationVisible] = React.useState(false);\r\n const [showLoginPopOver, setShowLoginPopOver] = React.useState(false);\r\n const [showAtStart, setShowAtStart] = React.useState(false);\r\n const [userInformed, setUserInformed] = React.useState(true);\r\n\r\n React.useEffect(() => {\r\n if (\r\n !userInformed &&\r\n bokaStatus !== CommandStatus.EXECUTING &&\r\n avbokaStatus !== CommandStatus.EXECUTING &&\r\n !!pass &&\r\n !!pass.statusMessage\r\n ) {\r\n setStatusMessageVisible(true);\r\n setStatusMessageText(pass.statusMessage);\r\n setUserInformed(true);\r\n setTimeout(() => {\r\n setStatusMessageVisible(false);\r\n setStatusMessageText('');\r\n }, 4500);\r\n }\r\n }, [userInformed, bokaStatus, avbokaStatus, pass]);\r\n\r\n const closePublicPopup = () => {\r\n setShowLoginPopOver(false);\r\n setShowAtStart(true);\r\n allowBokaPass();\r\n };\r\n\r\n const getStatusMessageClass = () => {\r\n if (\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.OK_BOOK ||\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.QUEUED ||\r\n statusMessageText === SitecoreDictionary.Schedule.Messages.OK_CANCEL\r\n ) {\r\n return okStatusClass;\r\n } else {\r\n return errorStatusClass;\r\n }\r\n };\r\n const hideConfirmation = () => {\r\n setConfirmationVisible(false);\r\n };\r\n\r\n const avbokaPass = () => {\r\n if (!pass) {\r\n return;\r\n }\r\n let bokning = bokningar.find(b => b.PassId.toString() === pass.PassId.toString());\r\n if (bokning) {\r\n let payload = {\r\n bokningId: bokning.BokningId.toString(),\r\n foereningsId: aktivFoerening,\r\n queued: bokning.Koad,\r\n passId: bokning.PassId,\r\n anlaeggningsId: bokning.AnlaeggningsId,\r\n };\r\n const date = getDateTextForView(pass.StartTime);\r\n scheduleAvbokaPass(payload, pass.PassId, date);\r\n\r\n // GTM stuff for avboka\r\n // tslint:disable-next-line\r\n let test: any = window;\r\n /* tslint:disable */\r\n test.dataLayer.push({\r\n event: 'cancelBookedTraining',\r\n passName: pass.PassNamn,\r\n passId: pass.PassId,\r\n startTime: pass.StartTime,\r\n AnlaeggningsNamn: pass.AnlaeggningsNamn,\r\n });\r\n }\r\n setUserInformed(false);\r\n hideConfirmation();\r\n };\r\n\r\n const handleOnClickIconButton = (event: React.MouseEvent, statusBarIsActive?: boolean) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (!pass || pass.disabled || statusBarIsActive) {\r\n return;\r\n }\r\n\r\n const passIsBooked = bokningar.find(b => b.PassId === pass.PassId);\r\n const bookable =\r\n pass.BokningStatus !== BokningsStatusEnum.DROPIN && pass.BokningStatus !== BokningsStatusEnum.INSTAELLD;\r\n if (!isPublicWebMode && passIsBooked) {\r\n setConfirmationVisible(true);\r\n } else if (bookable) {\r\n const bokaKoePlats =\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN;\r\n if (!isPublicWebMode) {\r\n bokaPass(pass, bokaKoePlats);\r\n setUserInformed(false);\r\n //GTM stuff for boka\r\n // tslint:disable-next-line\r\n let test: any = window;\r\n /* tslint:disable */\r\n\r\n test.dataLayer.push({\r\n event: 'bookTraining',\r\n passName: pass.PassNamn,\r\n passId: pass.PassId,\r\n startTime: pass.StartTime,\r\n AnlaeggningsNamn: pass.AnlaeggningsNamn,\r\n });\r\n } else {\r\n if (!isAuthenticated && !showLoginPopOver && allowBokaPassFromSitecore) {\r\n disableBokaPass();\r\n setShowLoginPopOver(true);\r\n bokaPass(pass, bokaKoePlats);\r\n }\r\n }\r\n } else {\r\n setStatusMessageVisible(true);\r\n setStatusMessageText(\r\n NotBookable.indexOf(pass.BokningStatus) >= 0\r\n ? SitecoreDictionary.Schedule.BookingStatus[pass.BokningStatus]\r\n : SitecoreDictionary.Schedule.Messages.UNKNOWN_ERROR\r\n );\r\n setTimeout(() => {\r\n setStatusMessageVisible(false);\r\n setStatusMessageText('');\r\n }, 4500);\r\n }\r\n };\r\n const getConfirmationText = () => {\r\n let confirmationText = translate(SitecoreDictionary.Schedule.ConfirmBook);\r\n if (!pass) {\r\n return confirmationText as string;\r\n }\r\n if (bokningar.find(b => b.PassId === pass.PassId)) {\r\n confirmationText = translate(SitecoreDictionary.Schedule.ConfirmCancel);\r\n }\r\n\r\n confirmationText = confirmationText.toString().replace(SitecorePlaceholder.PASS, pass.PassNamn);\r\n confirmationText = confirmationText.toString().replace(SitecorePlaceholder.FOERENING, pass.AnlaeggningsNamn);\r\n\r\n return confirmationText;\r\n };\r\n\r\n const getIconButtonText = () => {\r\n if (!pass) {\r\n return `0 ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n }\r\n const bokning = bokningar.find(b => b.PassId === pass.PassId);\r\n\r\n if (pass.AerInstaelld) {\r\n return `${translate(SitecoreDictionary.Schedule.Messages.CANCELLED)}`;\r\n }\r\n if (!!bokning && bokning.Koad) {\r\n return `${translate(SitecoreDictionary.PassItem.QueuePosition)} ${bokning.KoPlats}`;\r\n } else if (!!bokning) {\r\n if (pass.AntalLedigaPlatser === 0) {\r\n return `${pass.AntalIVaenteLista} ${translate(SitecoreDictionary.PassItem.InQueue)}`;\r\n } else {\r\n return `${pass.AntalLedigaPlatser} ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n }\r\n } else if (pass.BokningStatus === BokningsStatusEnum.DROPIN) {\r\n return `${pass.AntalDropinPlatser.toString()} drop-in`;\r\n } else if (\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_DROPIN\r\n ) {\r\n return `${pass.AntalLedigaPlatser} ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n } else if (\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN\r\n ) {\r\n return `${pass.AntalIVaenteLista} ${translate(SitecoreDictionary.PassItem.InQueue)}`;\r\n }\r\n\r\n return `${pass.AntalLedigaPlatser} ${translate(SitecoreDictionary.PassItem.Left)}`;\r\n };\r\n\r\n const getIconButtonStyle = () => {\r\n if (!pass) {\r\n return '--Available';\r\n }\r\n let bokning = bokningar.find(b => b.PassId === pass.PassId);\r\n\r\n const isCancelled = pass.AerInstaelld;\r\n\r\n if (!isCancelled && bokning) {\r\n if (bokning.Koad) {\r\n return '--BookedWithQueue';\r\n } else {\r\n return '--Booked';\r\n }\r\n }\r\n\r\n switch (pass.BokningStatus) {\r\n case BokningsStatusEnum.EJ_BOKNINGSBART_DATE_DROPIN:\r\n return '--NotAvailableYet';\r\n case BokningsStatusEnum.FOERSENT_FOER_ATT_BOKA:\r\n return '--LateToBook';\r\n case BokningsStatusEnum.FOERTIDIGT_FOER_ATT_BOKA:\r\n return '--EarlyToBook';\r\n case BokningsStatusEnum.BOKNINGSBART:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_DROPIN:\r\n return '--Available';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN:\r\n return '--AvailableWithQueue';\r\n case BokningsStatusEnum.FULLT || BokningsStatusEnum.FULLT_DROPIN:\r\n return '--MaxCapacity';\r\n case BokningsStatusEnum.DROPIN:\r\n return '--Dropin';\r\n case BokningsStatusEnum.INSTAELLD:\r\n return '--Cancelled';\r\n default:\r\n return '--Available';\r\n }\r\n };\r\n\r\n const renderPass = () => {\r\n let isSelected = false;\r\n if (!pass) {\r\n return
    ;\r\n }\r\n if (selectedPass) {\r\n isSelected = selectedPass.PassId === pass.PassId;\r\n }\r\n return (\r\n \r\n
    \r\n {confirmationVisible && (\r\n \r\n )}\r\n\r\n
    \r\n
    {formatTime(pass.StartTime, 'HH:mm')}
    \r\n
    {pass.Length} min
    \r\n
    \r\n\r\n
    \r\n
    {pass.PassNamn}
    \r\n
    \r\n {renderWithMaxLength(pass.Instruktoerer ? pass.Instruktoerer.toString() : '', 80)}\r\n
    \r\n
    \r\n {pass.AnlaeggningsNamn.replace('Friskis&Svettis', 'F&S').replace(/.+? • /, '')}\r\n {\r\n pass.Lokal && pass.Lokal.length > 0\r\n ? ', ' + pass.Lokal.join(', ').replace(' ', '\\u00A0')\r\n : '' /* \\u00A0 =   */\r\n }\r\n
    \r\n {pass.ExtraInfo && (\r\n
    \r\n } header={pass.ExtraInfo} />\r\n
    \r\n )}\r\n
    \r\n\r\n {!isPublicWebMode && (\r\n \r\n )}\r\n
    \r\n {!isPublicWebMode && (\r\n \r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n };\r\n\r\n const formatTime = (dateTime: string, format: string) => {\r\n const mDateTime = moment(dateTime);\r\n if (mDateTime.isValid()) {\r\n return mDateTime.format(format);\r\n } else {\r\n return null;\r\n }\r\n };\r\n return (\r\n <>\r\n {!!pass && !pass.disabled && (!isPublicWebMode || pass.BokningStatus !== BokningsStatusEnum.INSTAELLD) && (\r\n \r\n {isPublicWebMode && (\r\n
    \r\n {renderPass()}\r\n
    \r\n )}\r\n {!isPublicWebMode && (\r\n \r\n {renderPass()}\r\n \r\n )}\r\n
    \r\n )}\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { HeaderIconEnum } from 'store/global/ui/header';\r\n\r\nimport { IconFilterCalendarView, IconFilterListView } from 'components/icons';\r\nimport { UIScheduleState, UIScheduleViewType } from '../../../store/global/ui/schedule/uiScheduleReducer';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ScheduleModeSwitcherDataProps {\r\n icon: HeaderIconEnum;\r\n scheduleUIState: UIScheduleState;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface ScheduleModeSwitcherActionProps {\r\n setScheduleToListView: () => void;\r\n setScheduleToWeekView: () => void;\r\n}\r\n\r\nexport type ScheduleModeSwitcherProps = ScheduleModeSwitcherDataProps & ScheduleModeSwitcherActionProps;\r\n\r\nexport class ScheduleModeSwitcher extends React.Component, {}> {\r\n onListViewClick() {\r\n this.props.setScheduleToListView();\r\n }\r\n\r\n onWeekViewClick() {\r\n this.props.setScheduleToWeekView();\r\n const ele = document.getElementById('passlist') as HTMLElement;\r\n if (ele !== null) {\r\n ele.scrollIntoView();\r\n }\r\n }\r\n\r\n scheduleStateIs(scheduleViewType: UIScheduleViewType) {\r\n return scheduleViewType === this.props.scheduleUIState.viewShowing;\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n
    this.onListViewClick()}>\r\n \r\n
    \r\n
    this.onWeekViewClick()}>\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\n\r\n// import { ActionType as RouteActionType } from 'store/location/actions';\r\n// import { getLocation } from 'store/location';\r\n// import { SideBarAction, SidebarSize, SideBarState } from 'store/global/ui/side-bar';\r\nimport { UIScheduleAction, UIScheduleActionType } from 'store/global/ui/schedule';\r\nimport {\r\n ScheduleModeSwitcherDataProps,\r\n ScheduleModeSwitcherActionProps,\r\n ScheduleModeSwitcher,\r\n} from './ScheduleModeSwitcher';\r\nimport { UIScheduleViewType } from 'store/global/ui/schedule/uiScheduleReducer';\r\nimport { SideBarAction, SidebarSize } from 'store/global/ui/side-bar';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { goBack, goToSchedule } from 'store/location';\r\nimport { UIScheduleFilterActionType } from 'store/global/ui/schedule-filter';\r\n\r\nconst setScheduleToListView = () => (dispatch: Dispatch) => {\r\n // Vi vill att detta endast ska ske för desktop, men denna komponent finns endast för desktop, så....\r\n dispatch(goBack());\r\n\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MINIMISED',\r\n size: SidebarSize.MINIMISED,\r\n });\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToList,\r\n viewShowing: UIScheduleViewType.LISTVIEW,\r\n });\r\n};\r\n\r\nconst setScheduleToWeekView = () => (dispatch: Dispatch) => {\r\n // Vi vill att detta endast ska ske för desktop, men denna komponent finns endast för desktop, så....\r\n dispatch(goToSchedule());\r\n\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetFilterToMinimised,\r\n expanded: false,\r\n });\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToWeek,\r\n viewShowing: UIScheduleViewType.WEEKVIEW,\r\n });\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MAXIMISED',\r\n size: SidebarSize.MAXIMISED,\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState): ScheduleModeSwitcherDataProps => ({\r\n icon: state.global.ui.header.rightDesktopIcon,\r\n scheduleUIState: state.global.ui.schedule,\r\n translate: getTranslate(state.locale),\r\n});\r\n\r\nconst mapDispatchToProps: ScheduleModeSwitcherActionProps = {\r\n setScheduleToListView: setScheduleToListView,\r\n setScheduleToWeekView: setScheduleToWeekView,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ScheduleModeSwitcher);\r\n","import * as React from 'react';\r\nimport { PassFilterKategorier } from 'store/passFilter';\r\nimport { MainButton } from 'components/common/MainButton';\r\n\r\nexport interface PassFilterOverlayMessageInternalDataProps {\r\n visaTraeningsstaelleMeddelande: boolean;\r\n visaIngaTraeffarMeddelande: boolean;\r\n}\r\n\r\nexport interface PassFilterOverlayMessageExternalDataProps {\r\n isFullDesktopView: boolean;\r\n}\r\n\r\nexport interface PassFilterOverlayMessageActionProps {\r\n visaFilter(): void;\r\n vaeljKategori(kategori: keyof typeof PassFilterKategorier): void;\r\n}\r\n\r\nexport type PassFilterOverlayMessageDataProps = PassFilterOverlayMessageInternalDataProps &\r\n PassFilterOverlayMessageExternalDataProps;\r\n\r\nexport type PassFilterOverlayMessageProps = PassFilterOverlayMessageDataProps & PassFilterOverlayMessageActionProps;\r\n\r\nexport class PassFilterOverlayMessage extends React.Component {\r\n render() {\r\n if (!this.props.visaIngaTraeffarMeddelande && !this.props.visaTraeningsstaelleMeddelande) {\r\n return null;\r\n }\r\n return (\r\n \r\n
    \r\n {this.props.visaIngaTraeffarMeddelande && (\r\n \r\n Inga träffar\r\n \r\n )}\r\n {this.props.visaTraeningsstaelleMeddelande && (\r\n \r\n Du måste välja minst ett träningsställe\r\n {\r\n this.props.visaFilter();\r\n this.props.vaeljKategori('Traeningsstaelle');\r\n }}\r\n title=\"Välj träningsställe\"\r\n />\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n PassFilterOverlayMessageDataProps,\r\n PassFilterOverlayMessageActionProps,\r\n PassFilterOverlayMessage,\r\n PassFilterOverlayMessageExternalDataProps,\r\n} from './PassFilterOverlayMessage';\r\nimport {\r\n isFiltervalGrupp,\r\n passFilterVisaFilter,\r\n passFilterSetKategoriVald,\r\n PassFilterKategorier,\r\n} from 'store/passFilter';\r\n\r\nconst mapState = (\r\n state: RootState,\r\n props: PassFilterOverlayMessageExternalDataProps\r\n): PassFilterOverlayMessageDataProps => {\r\n const harPass = state.passFilter.filteredPassIds.map(ids => ids.passIds.length).some(n => n !== 0);\r\n const traeningsstaelleFilter = state.passFilter.filter.Traeningsstaelle;\r\n const skaVisaTraeningsstaelleMeddelande =\r\n !!traeningsstaelleFilter &&\r\n traeningsstaelleFilter.vaerden.length > 3 &&\r\n !traeningsstaelleFilter.vaerden.some(v => {\r\n if (isFiltervalGrupp(v)) {\r\n return v.filterval.some(fv => fv.vald);\r\n } else {\r\n return v.vald;\r\n }\r\n });\r\n return {\r\n visaIngaTraeffarMeddelande: !harPass,\r\n visaTraeningsstaelleMeddelande: skaVisaTraeningsstaelleMeddelande,\r\n isFullDesktopView: props.isFullDesktopView,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: any): PassFilterOverlayMessageActionProps => ({\r\n visaFilter: () => {\r\n dispatch(passFilterVisaFilter(true));\r\n },\r\n vaeljKategori: (kategori: keyof typeof PassFilterKategorier) => {\r\n dispatch(passFilterSetKategoriVald(kategori, true));\r\n },\r\n});\r\n\r\nexport default connect(mapState, mapDispatchToProps)(PassFilterOverlayMessage);\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { PassFilterExternalProps, PassFilterDataProps, PassFilterActionProps, PassFilter } from './PassFilter';\r\nimport {\r\n PassFilterKategorier,\r\n passFilterSetKategoriVald,\r\n passFilterSetFilterValt,\r\n passFilterSetAllaIFiltergruppVald,\r\n passFilterSetFilterIGruppVald,\r\n passFilterSetFiltergruppOeppnad,\r\n PassFilterFavoritfilter,\r\n passFilterSetFavoritfilterValt,\r\n passFilterRensaFilter,\r\n passFilterVisaFilter,\r\n saveFavouriteFilter,\r\n getFavouriteFilters,\r\n deleteFavouriteFilter,\r\n passFilterSetFilterFraanCache,\r\n PassFilterFilterCache,\r\n} from 'store/passFilter';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { HeaderIconEnum, setHeaderIcons } from 'store/global/ui/header';\r\nimport { getQueryStringValue } from 'utils';\r\nimport { LocationActionTypes } from 'store/location';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\n\r\nconst mapState = (state: RootState, props: PassFilterExternalProps): PassFilterDataProps => {\r\n const inloggadFoerening = state.global.session.inloggadeFoereningar.find(\r\n i => '' + i.Id === '' + state.global.session.activeFoerening\r\n );\r\n let foereningName = decodeURIComponent(getQueryStringValue('foerening'));\r\n if (!foereningName && inloggadFoerening) {\r\n foereningName = inloggadFoerening.DisplayName;\r\n }\r\n return {\r\n filter: state.passFilter.filter,\r\n oeppenKategori: state.passFilter.oeppenKategori,\r\n favoritFilter: state.passFilter.favoritFilter,\r\n valtFavoritFilterId: state.passFilter.valtFavoritFilterId,\r\n filterSynligt: state.passFilter.filterSynligt,\r\n translate: getTranslate(state.locale),\r\n userId: state.global.session.userId,\r\n flatFilter: state.passFilter.flatFilter,\r\n harTraeffar: state.passFilter.filteredPassIds.some(p => p.passIds.length > 0),\r\n foereningName: foereningName,\r\n foereningId: !!inloggadFoerening ? inloggadFoerening.Id : undefined,\r\n isPassDetailsShowing: state.location.type === LocationActionTypes.PassDetails,\r\n ...props,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: any): PassFilterActionProps => ({\r\n vaeljKategori: (kategori: keyof typeof PassFilterKategorier, vald: boolean) => {\r\n dispatch(passFilterSetKategoriVald(kategori, vald));\r\n },\r\n vaeljFilter: (kategori: keyof typeof PassFilterKategorier, namn: string, vald: boolean) => {\r\n dispatch(passFilterSetFilterValt(kategori, namn, vald));\r\n },\r\n vaeljAllaIFiltergrupp: (kategori: keyof typeof PassFilterKategorier, filtergruppNamn: string, vald: boolean) => {\r\n dispatch(passFilterSetAllaIFiltergruppVald(kategori, filtergruppNamn, vald));\r\n },\r\n vaeljFilterIGrupp: (\r\n kategori: keyof typeof PassFilterKategorier,\r\n filtergruppNamn: string,\r\n filter: string,\r\n vald: boolean\r\n ) => {\r\n dispatch(passFilterSetFilterIGruppVald(kategori, filtergruppNamn, filter, vald));\r\n },\r\n oeppnaFiltergrupp: (kategori: keyof typeof PassFilterKategorier, filtergruppNamn: string, oeppnad: boolean) => {\r\n dispatch(passFilterSetFiltergruppOeppnad(kategori, filtergruppNamn, oeppnad));\r\n },\r\n vaeljFavoritfilter: (favoritfilterId: number) => {\r\n dispatch(passFilterSetFavoritfilterValt(favoritfilterId));\r\n },\r\n skapaFavoritfilter: (favoritfilter: PassFilterFavoritfilter) => {\r\n return dispatch>>(saveFavouriteFilter(favoritfilter));\r\n },\r\n rensaFilter: () => {\r\n dispatch(passFilterRensaFilter());\r\n },\r\n setFilterSynligt: (synligt: boolean) => {\r\n dispatch(passFilterVisaFilter(synligt));\r\n },\r\n deleteFavoritFilter: (favoritfilter: PassFilterFavoritfilter) => {\r\n return dispatch>>(deleteFavouriteFilter(favoritfilter));\r\n },\r\n getFavoritFilters: (userId: number) => {\r\n return dispatch>>(getFavouriteFilters(userId));\r\n },\r\n setFilterFraanCache: (cache: PassFilterFilterCache) => {\r\n dispatch(passFilterSetFilterFraanCache(cache));\r\n },\r\n setHeaderIcons: (\r\n leftDesktopIcon?: HeaderIconEnum,\r\n rightDesktopIcon?: HeaderIconEnum,\r\n leftMobileIcon?: HeaderIconEnum,\r\n rightMobileIcon?: HeaderIconEnum\r\n ) => dispatch(setHeaderIcons(leftDesktopIcon, rightDesktopIcon, leftMobileIcon, rightMobileIcon)),\r\n});\r\n\r\nexport default connect(mapState, mapDispatchToProps)(PassFilter);\r\n","import * as React from 'react';\r\nimport {\r\n PassFilterFiltrerbarKategori,\r\n PassFilterKategorier,\r\n PassFilterFavoritfilter,\r\n PassFilterFiltrerbaraKategorier,\r\n PassFilterFlatKategorier,\r\n PassFilterFilterCache,\r\n PassFilterLegacyFilterCache,\r\n} from 'store/passFilter/passFilterModels';\r\nimport { isFiltervalGrupp } from 'store/passFilter';\r\nimport { MainInput, ConfirmationTextBox } from 'components/common';\r\nimport { IconChevron, IconRoundButtonCheckmark, IconHeart, IconRemove, IconArrow } from '../../icons';\r\nimport PassFilterOverlayMessageContainer from './overlay/PassFilterOverlayMessageContainer';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { MainButton } from '../MainButton';\r\nimport { HeaderIconEnum } from 'store/global/ui/header';\r\nimport { Spinner } from '../Spinner';\r\nimport { ErrorResult, SuccessResult } from 'websd/utils/configureApi';\r\nimport { PopOver } from '../PopOver';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { getQueryStringValue } from 'utils';\r\nimport { ScheduleFilter } from 'store/schedule/scheduleModels';\r\n\r\nexport interface PassFilterInternalProps {\r\n filter: PassFilterFiltrerbaraKategorier;\r\n oeppenKategori?: keyof typeof PassFilterKategorier;\r\n favoritFilter: PassFilterFavoritfilter[];\r\n valtFavoritFilterId?: number;\r\n filterSynligt: boolean;\r\n translate: TranslateFunction;\r\n userId?: number;\r\n flatFilter: PassFilterFlatKategorier;\r\n harTraeffar: boolean;\r\n foereningName?: string;\r\n foereningId?: number;\r\n isPassDetailsShowing: boolean;\r\n}\r\n\r\nexport interface PassFilterExternalProps {\r\n isFullDesktopView: boolean;\r\n isPublicWebMode: boolean;\r\n}\r\n\r\nexport interface PassFilterActionProps {\r\n vaeljKategori: (kategori: keyof typeof PassFilterKategorier, vald: boolean) => void;\r\n vaeljFilter: (kategori: keyof typeof PassFilterKategorier, namn: string, vald: boolean) => void;\r\n vaeljAllaIFiltergrupp: (kategori: keyof typeof PassFilterKategorier, filtergruppNamn: string, vald: boolean) => void;\r\n vaeljFilterIGrupp: (\r\n kategori: keyof typeof PassFilterKategorier,\r\n filtergruppNamn: string,\r\n filter: string,\r\n vald: boolean\r\n ) => void;\r\n oeppnaFiltergrupp: (kategori: keyof typeof PassFilterKategorier, filtergruppNamn: string, oeppnad: boolean) => void;\r\n rensaFilter: () => void;\r\n setFilterSynligt: (synligt: boolean) => void;\r\n\r\n vaeljFavoritfilter: (favoritfilterId: number) => void;\r\n skapaFavoritfilter: (\r\n favoritfilter: PassFilterFavoritfilter\r\n ) => Promise>;\r\n deleteFavoritFilter: (favoritfilter: PassFilterFavoritfilter) => Promise>;\r\n getFavoritFilters: (userId: number) => Promise>;\r\n setFilterFraanCache: (flatFilter: PassFilterFilterCache) => void;\r\n setHeaderIcons: (\r\n leftDesktopIcon?: HeaderIconEnum,\r\n rightDesktopIcon?: HeaderIconEnum,\r\n leftMobileIcon?: HeaderIconEnum,\r\n rightMobileIcon?: HeaderIconEnum\r\n ) => void;\r\n}\r\n\r\nexport type PassFilterDataProps = PassFilterInternalProps & PassFilterExternalProps;\r\ntype PassFilterProps = PassFilterDataProps & PassFilterActionProps;\r\n\r\nexport const PassFilter: React.FunctionComponent = ({\r\n filter,\r\n oeppenKategori,\r\n favoritFilter,\r\n valtFavoritFilterId,\r\n filterSynligt,\r\n translate,\r\n userId,\r\n flatFilter,\r\n harTraeffar,\r\n isFullDesktopView,\r\n isPublicWebMode,\r\n vaeljKategori,\r\n vaeljFilter,\r\n vaeljAllaIFiltergrupp,\r\n vaeljFilterIGrupp,\r\n oeppnaFiltergrupp,\r\n rensaFilter,\r\n setFilterSynligt,\r\n foereningName,\r\n foereningId,\r\n isPassDetailsShowing,\r\n\r\n vaeljFavoritfilter,\r\n skapaFavoritfilter,\r\n deleteFavoritFilter,\r\n getFavoritFilters,\r\n setFilterFraanCache,\r\n setHeaderIcons,\r\n}) => {\r\n const popOverConstraintContainer = React.useRef(null);\r\n const [sparaFilterOeppnat, setSparaFilterOeppnat] = React.useState(false);\r\n const [taBortFilterOeppnat, setTaBortFilterOeppnat] = React.useState(false);\r\n const [spararNyttFilter, setSpararNyttFilter] = React.useState(false);\r\n const [nyttFavoritfilterNamn, setNyttFavoritfilterNamn] = React.useState();\r\n const [soekstraengar, setSoekstraengar] = React.useState<{ [key in keyof typeof PassFilterKategorier]: string }>({\r\n LedareOrTraenare: '',\r\n Tidpunkt: '',\r\n Traeningspass: '',\r\n Traeningsstaelle: '',\r\n Veckodag: '',\r\n });\r\n const [favoritFilterBorttagning, setFavoritFilterBorttagning] = React.useState<{\r\n [key: number]: { fraagaSynlig: boolean; tasBort: boolean };\r\n }>({});\r\n\r\n React.useEffect(() => {\r\n if (!isPublicWebMode) {\r\n uppdateraFilterFraanCache();\r\n } else {\r\n uppdateraPassFilterFraanQuery();\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (userId && !isPublicWebMode) {\r\n getFavoritFilters(userId).then(r => {\r\n if (!r.error) {\r\n uppdateraFilterFraanCache(r.result);\r\n\r\n (window as any).dataLayer.push({\r\n numberOfFavorites: r.result.length,\r\n forening: foereningName,\r\n });\r\n }\r\n });\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [userId]);\r\n\r\n React.useEffect(() => {\r\n if (userId && !isPublicWebMode) {\r\n const cached: PassFilterFilterCache = {\r\n LedareOrTraenare: flatFilter.LedareOrTraenare,\r\n Tidpunkt: flatFilter.Tidpunkt,\r\n Traeningspass: flatFilter.Traeningspass,\r\n Traeningsstaelle: flatFilter.Traeningsstaelle,\r\n Veckodag: flatFilter.Veckodag,\r\n favoritFilter: valtFavoritFilterId,\r\n };\r\n localStorage.setItem('cachedFilter', JSON.stringify(cached));\r\n }\r\n }, [flatFilter, isPublicWebMode, userId, valtFavoritFilterId]);\r\n\r\n React.useEffect(() => {\r\n if (isPassDetailsShowing) {\r\n return;\r\n }\r\n if (filterSynligt) {\r\n setHeaderIcons(undefined, undefined, HeaderIconEnum.NONE, HeaderIconEnum.NONE);\r\n } else {\r\n setHeaderIcons(\r\n undefined,\r\n undefined,\r\n HeaderIconEnum.FILTER,\r\n isPublicWebMode ? HeaderIconEnum.NONE : HeaderIconEnum.BACK\r\n );\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isPassDetailsShowing, filterSynligt]);\r\n\r\n const getAntalValdaFilter = () => {\r\n return (\r\n flatFilter.LedareOrTraenare.length +\r\n flatFilter.Tidpunkt.length +\r\n flatFilter.Traeningspass.length +\r\n flatFilter.Traeningsstaelle.length +\r\n flatFilter.Veckodag.length\r\n );\r\n };\r\n\r\n const flattenKategori = (filter: PassFilterFiltrerbarKategori) => {\r\n const result: string[] = [];\r\n if (filter.vaerden.length === 0) {\r\n return result;\r\n }\r\n filter.vaerden.forEach(v => {\r\n if (isFiltervalGrupp(v)) {\r\n v.filterval.forEach(f => {\r\n if (f.vald) {\r\n result.push(f.vaerde);\r\n }\r\n });\r\n } else if (v.vald) {\r\n result.push(v.vaerde);\r\n }\r\n });\r\n return result;\r\n };\r\n\r\n const konstrueraValdaFilternamn = (filter: PassFilterFiltrerbarKategori) => {\r\n let result: string = '';\r\n if (filter.vaerden.length === 0) {\r\n return result;\r\n }\r\n filter.vaerden.forEach(v => {\r\n if (isFiltervalGrupp(v)) {\r\n v.filterval.forEach(f => {\r\n if (f.vald) {\r\n if (result !== '') {\r\n result += ', ';\r\n }\r\n result += filter.anvaendTranslate ? translate(f.namn) : f.namn;\r\n }\r\n });\r\n } else if (v.vald) {\r\n if (result !== '') {\r\n result += ', ';\r\n }\r\n result += filter.anvaendTranslate ? translate(v.namn) : v.namn;\r\n }\r\n });\r\n return result;\r\n };\r\n\r\n const renderFavoritFilter = () => {\r\n return (\r\n \r\n {favoritFilter.length > 0 && (\r\n \r\n {!isFullDesktopView && (\r\n \r\n {translate(SitecoreDictionary.Schedule.Filter.SavedFilters)}\r\n \r\n )}\r\n \r\n {favoritFilter.map(f => {\r\n return (\r\n {\r\n if (f.FilterId === valtFavoritFilterId) {\r\n rensaFilter();\r\n } else {\r\n vaeljFavoritfilter(f.FilterId);\r\n }\r\n }}\r\n >\r\n {f.FilterName}\r\n
    \r\n );\r\n })}\r\n\r\n
    \r\n {\r\n setTaBortFilterOeppnat(!taBortFilterOeppnat);\r\n }}\r\n >\r\n {translate(SitecoreDictionary.Schedule.Filter.DeleteFilter)}\r\n
    \r\n {isFullDesktopView && taBortFilterOeppnat && popOverConstraintContainer.current && (\r\n \r\n {renderTaBortContainer()}\r\n \r\n )}\r\n
    \r\n
    \r\n {!isFullDesktopView && taBortFilterOeppnat && (\r\n
    \r\n
    \r\n
    \r\n
    setTaBortFilterOeppnat(false)}>\r\n \r\n
    \r\n {translate(SitecoreDictionary.Schedule.Filter.SaveFilter)}\r\n {/* Fulhack för att se till att texten ovan hamnar i mitten. */}\r\n
    \r\n \r\n
    \r\n
    \r\n {renderTaBortContainer()}\r\n
    \r\n
    \r\n )}\r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n const renderTaBortContainer = () => {\r\n return (\r\n
    \r\n {favoritFilter.map(f => {\r\n const borttagning = favoritFilterBorttagning[f.FilterId];\r\n return (\r\n \r\n {f.FilterName}\r\n {borttagning && borttagning.tasBort && }\r\n {(!borttagning || !borttagning.tasBort) && (\r\n {\r\n const res = { ...favoritFilterBorttagning };\r\n if (!res[f.FilterId]) {\r\n res[f.FilterId] = { fraagaSynlig: true, tasBort: false };\r\n } else {\r\n res[f.FilterId].fraagaSynlig = true;\r\n }\r\n setFavoritFilterBorttagning(res);\r\n }}\r\n >\r\n \r\n
    \r\n )}\r\n {borttagning && borttagning.fraagaSynlig && (\r\n {\r\n const res = { ...favoritFilterBorttagning };\r\n res[f.FilterId].fraagaSynlig = false;\r\n setFavoritFilterBorttagning(res);\r\n }}\r\n handleYes={() => {\r\n deleteFavoritFilter(f).then(result => {\r\n const res = { ...favoritFilterBorttagning };\r\n res[f.FilterId].tasBort = false;\r\n setFavoritFilterBorttagning(res);\r\n setTaBortFilterOeppnat(favoritFilter.length === 0 ? false : taBortFilterOeppnat);\r\n });\r\n {\r\n const res = { ...favoritFilterBorttagning };\r\n res[f.FilterId].fraagaSynlig = false;\r\n res[f.FilterId].tasBort = true;\r\n setFavoritFilterBorttagning(res);\r\n }\r\n }}\r\n text={(translate(SitecoreDictionary.Schedule.Filter.DeleteFilterConfirm) as string).replace(\r\n '$0',\r\n f.FilterName\r\n )}\r\n translate={translate}\r\n />\r\n )}\r\n \r\n );\r\n })}\r\n \r\n );\r\n };\r\n\r\n const renderSparaRensa = () => {\r\n return (\r\n \r\n
    \r\n {/* Spara / rensa */}\r\n {!isPublicWebMode && !!foereningId && (\r\n
    \r\n setSparaFilterOeppnat(true)}\r\n >\r\n \r\n {translate(SitecoreDictionary.Schedule.Filter.SaveFilter)}\r\n
    \r\n {isFullDesktopView && sparaFilterOeppnat && popOverConstraintContainer.current && (\r\n \r\n {renderSparaContainer()}\r\n \r\n )}\r\n {!isFullDesktopView && sparaFilterOeppnat && (\r\n
    {renderSparaContainer()}
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n \r\n {translate(SitecoreDictionary.Schedule.Filter.ClearFilter)}\r\n
    \r\n \r\n
    \r\n );\r\n };\r\n\r\n const renderSparaContainer = () => {\r\n return (\r\n
    \r\n {translate(SitecoreDictionary.Schedule.Filter.NameFilterTitle)}\r\n setNyttFavoritfilterNamn(v as string)}\r\n value={nyttFavoritfilterNamn || ''}\r\n autoSelect={true}\r\n />\r\n {spararNyttFilter && }\r\n {!spararNyttFilter && (\r\n
    \r\n setSparaFilterOeppnat(false)}\r\n disabled={false}\r\n />\r\n {\r\n if (userId) {\r\n setSpararNyttFilter(true);\r\n skapaFavoritfilter({\r\n FilterName: nyttFavoritfilterNamn as string,\r\n FilterId: 0,\r\n UserId: userId,\r\n FoereningId: foereningId!,\r\n Veckodag: flattenKategori(filter.Veckodag),\r\n Traeningsstaelle: flattenKategori(filter.Traeningsstaelle),\r\n Traeningspass: flattenKategori(filter.Traeningspass),\r\n Tidpunkt: flattenKategori(filter.Tidpunkt),\r\n LedareOrTraenare: flattenKategori(filter.LedareOrTraenare),\r\n }).then(() => {\r\n setSpararNyttFilter(false);\r\n setSparaFilterOeppnat(false);\r\n setNyttFavoritfilterNamn(undefined);\r\n });\r\n } else {\r\n setSparaFilterOeppnat(false);\r\n setNyttFavoritfilterNamn(undefined);\r\n }\r\n }}\r\n disabled={favoritFilter.some(f => f.FilterName === nyttFavoritfilterNamn)}\r\n />\r\n
    \r\n )}\r\n
    \r\n );\r\n };\r\n\r\n const renderKategorival = (\r\n filtrerbarKategori: PassFilterFiltrerbarKategori,\r\n kategoriNamn: keyof typeof PassFilterKategorier\r\n ) => {\r\n return (\r\n
    \r\n {filtrerbarKategori.vaerden\r\n .filter(\r\n v =>\r\n !filtrerbarKategori.soekbar ||\r\n !soekstraengar[kategoriNamn] ||\r\n (filtrerbarKategori.anvaendTranslate ? (translate(v.namn) as string) : v.namn)\r\n .toLocaleLowerCase()\r\n .indexOf(soekstraengar[kategoriNamn].toLocaleLowerCase()) !== -1 ||\r\n (isFiltervalGrupp(v) &&\r\n v.filterval.some(\r\n vf =>\r\n (filtrerbarKategori.anvaendTranslate ? (translate(vf.namn) as string) : vf.namn)\r\n .toLocaleLowerCase()\r\n .indexOf(soekstraengar[kategoriNamn].toLocaleLowerCase()) !== -1\r\n ))\r\n )\r\n .map(v => {\r\n return (\r\n \r\n {/* Grupperade val */}\r\n {isFiltervalGrupp(v) && (\r\n \r\n {\r\n oeppnaFiltergrupp(kategoriNamn, v.namn, !v.oeppen);\r\n e.stopPropagation();\r\n }}\r\n className=\"PassFilter__Kategorier__Kategori__Content__Vaerde__Val\"\r\n >\r\n \r\n {(filtrerbarKategori.anvaendTranslate ? translate(v.namn) : v.namn) +\r\n (v.filterval.filter(f2 => f2.vald).length > 0\r\n ? ' (' + v.filterval.filter(f2 => f2.vald).length + ')'\r\n : '')}\r\n \r\n \r\n
    \r\n {v.oeppen && (\r\n
    \r\n {\r\n vaeljAllaIFiltergrupp(\r\n kategoriNamn,\r\n v.namn,\r\n v.filterval.some(fv => !fv.vald)\r\n );\r\n }}\r\n className=\"PassFilter__Kategorier__Kategori__Content__Vaerde__Val\"\r\n >\r\n \r\n {(translate(SitecoreDictionary.Schedule.Filter.SelectAllInCategory) as string).replace(\r\n '$0',\r\n (filtrerbarKategori.anvaendTranslate ? (translate(v.namn) as string) : v.namn) + ' '\r\n )}\r\n \r\n !f2.vald)} />\r\n
    \r\n {v.filterval.map(v2 => {\r\n return (\r\n {\r\n vaeljFilterIGrupp(kategoriNamn, v.namn, v2.namn, !v2.vald);\r\n }}\r\n >\r\n \r\n {(filtrerbarKategori.anvaendTranslate ? (translate(v2.namn) as string) : v2.namn) + ' '}\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n )}\r\n \r\n )}\r\n {/* Ej grupperade val */}\r\n {!isFiltervalGrupp(v) && (\r\n {\r\n vaeljFilter(kategoriNamn, v.namn, !v.vald);\r\n }}\r\n >\r\n {(filtrerbarKategori.anvaendTranslate ? (translate(v.namn) as string) : v.namn) + ' '}\r\n \r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n );\r\n };\r\n\r\n const renderAllaKategorier = () => {\r\n return (\r\n \r\n
    \r\n {(Object.keys(filter) as (keyof typeof PassFilterKategorier)[]).map(kategori => {\r\n const f = filter[kategori];\r\n const harValdaFilter = f.vaerden.some(v =>\r\n isFiltervalGrupp(v) ? v.filterval.some(f2 => f2.vald) : v.vald\r\n );\r\n return (\r\n \r\n {\r\n vaeljKategori(kategori, oeppenKategori !== kategori);\r\n }}\r\n className=\"PassFilter__Kategorier__Kategori__Namn\"\r\n >\r\n
    \r\n
    \r\n {translate(SitecoreDictionary.Schedule.Filter.Categories[kategori])}\r\n {isFullDesktopView && harValdaFilter && (\r\n {' (' + flattenKategori(f).length + ')'}\r\n )}\r\n
    \r\n {!isFullDesktopView && harValdaFilter && (\r\n
    \r\n {konstrueraValdaFilternamn(f)}\r\n
    \r\n )}\r\n
    \r\n \r\n
    \r\n {oeppenKategori === kategori && (\r\n \r\n {isFullDesktopView && popOverConstraintContainer.current && (\r\n \r\n {renderKategoriContent(f, kategori)}\r\n \r\n )}\r\n {!isFullDesktopView && renderKategoriContent(f, kategori)}\r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n
    \r\n );\r\n };\r\n\r\n const renderKategoriContent = (f: PassFilterFiltrerbarKategori, kategori: keyof typeof PassFilterKategorier) => {\r\n return (\r\n
    \r\n {f.soekbar && (\r\n {\r\n const s = { ...soekstraengar };\r\n s[kategori] = value as string;\r\n setSoekstraengar(s);\r\n }}\r\n value={soekstraengar[kategori]}\r\n className=\"PassFilter__Kategorier__Kategori__Content--input\"\r\n />\r\n )}\r\n\r\n {renderKategorival(f, kategori)}\r\n
    \r\n );\r\n };\r\n\r\n const uppdateraPassFilterFraanQuery = (allaFavoritfilter?: PassFilterFavoritfilter[]) => {\r\n const defaultAnlaeggning = decodeURIComponent(getQueryStringValue('Anlaeggning'));\r\n const defaultTraeningspass = decodeURIComponent(getQueryStringValue('Traeningspass'));\r\n let defaultFilter: ScheduleFilter = {\r\n Veckodag: [],\r\n Traeningsstaelle: [],\r\n Traeningspass: [],\r\n Tidpunkt: [],\r\n LedareOrTraenare: [],\r\n Favoritfilter: [],\r\n Bokningsstatus: [],\r\n };\r\n if (defaultTraeningspass !== '' || defaultAnlaeggning !== '') {\r\n if (defaultAnlaeggning !== '') {\r\n defaultFilter.Traeningsstaelle = [defaultAnlaeggning];\r\n }\r\n if (defaultTraeningspass !== '') {\r\n defaultFilter.Traeningspass = [defaultTraeningspass];\r\n }\r\n }\r\n setFilterFraanCache(defaultFilter);\r\n };\r\n\r\n const uppdateraFilterFraanCache = (allaFavoritfilter?: PassFilterFavoritfilter[]) => {\r\n let cachedFilter = localStorage.getItem('filterStuff');\r\n if (cachedFilter) {\r\n if (!allaFavoritfilter) {\r\n return;\r\n }\r\n localStorage.removeItem('filterStuff');\r\n const parsedLegacyFilter = JSON.parse(cachedFilter) as PassFilterLegacyFilterCache;\r\n const favFilter =\r\n parsedLegacyFilter.Favoritfilter.length > 0\r\n ? allaFavoritfilter.find(f => f.FilterName === parsedLegacyFilter.Favoritfilter[0])\r\n : undefined;\r\n const parsedNewFilter: PassFilterFilterCache = {\r\n Veckodag: parsedLegacyFilter.Veckodag.map(v => v.toLocaleLowerCase()),\r\n Traeningsstaelle: parsedLegacyFilter.Traeningsstaelle.map(v => v.toLocaleLowerCase()),\r\n Traeningspass: parsedLegacyFilter.Traeningspass.map(v => v.toLocaleLowerCase()),\r\n Tidpunkt: parsedLegacyFilter.Tidpunkt.map(v => v.toLocaleLowerCase()),\r\n LedareOrTraenare: parsedLegacyFilter.LedareOrTraenare.map(v => v.toLocaleLowerCase()),\r\n favoritFilter: !!favFilter ? favFilter.FilterId : undefined,\r\n };\r\n\r\n setFilterFraanCache(parsedNewFilter);\r\n } else {\r\n cachedFilter = localStorage.getItem('cachedFilter');\r\n if (cachedFilter) {\r\n const parsedFilter = JSON.parse(cachedFilter) as PassFilterFilterCache;\r\n setFilterFraanCache(parsedFilter);\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n {(filterSynligt || isFullDesktopView) && (\r\n {\r\n popOverConstraintContainer.current = r;\r\n }}\r\n className={'PassFilter' + (isFullDesktopView ? ' PassFilter--fulldesktopview' : '')}\r\n >\r\n {!isPublicWebMode && renderFavoritFilter()}\r\n {renderAllaKategorier()}\r\n {renderSparaRensa()}\r\n {!isFullDesktopView && (\r\n
    \r\n {\r\n if (oeppenKategori) {\r\n vaeljKategori(oeppenKategori, false);\r\n }\r\n if (sparaFilterOeppnat) {\r\n setSparaFilterOeppnat(false);\r\n }\r\n if (taBortFilterOeppnat) {\r\n setTaBortFilterOeppnat(false);\r\n }\r\n setFilterSynligt(false);\r\n }}\r\n title={\r\n (harTraeffar\r\n ? (translate(SitecoreDictionary.Schedule.Filter.HideFilter) as string)\r\n : (translate(SitecoreDictionary.Schedule.Filter.FilterHasNoHits) as string)) +\r\n (getAntalValdaFilter() > 0 ? ' (' + getAntalValdaFilter() + ')' : '')\r\n }\r\n className={!harTraeffar ? 'Button--warning' : ''}\r\n />\r\n
    \r\n )}\r\n \r\n )}\r\n {(!filterSynligt || isFullDesktopView) && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import { Schedule, ScheduleOwnProps, ScheduleActionProps, ScheduleDataProps } from '.';\r\nimport { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { fetchPassListInForeground, fetchPassListInBackground } from 'store/pass';\r\nimport { getEntityStatus, FetchStatusAggregateTypes } from 'store/global/fetch';\r\nimport { LocationActionTypes } from 'store/location';\r\nimport { getQueryStringValue, constructSafeName } from 'utils';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { UIScheduleActionType, UIScheduleViewType } from 'store/global/ui/schedule';\r\nimport { SidebarSize } from 'store/global/ui/side-bar';\r\nimport {\r\n passFilterVisaFilter,\r\n isFiltervalGrupp,\r\n PassFilterFiltrerbaraKategorier,\r\n passFilterSetFritextTerm,\r\n} from 'store/passFilter';\r\nimport { getBookingsInBackground } from 'store/bokningar';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { Day } from 'models';\r\n\r\nconst mapState = (state: RootState, props: ScheduleDataProps): ScheduleOwnProps & ScheduleDataProps => {\r\n const passListFetchKey =\r\n state.location.type === LocationActionTypes.PublicSchedule\r\n ? constructSafeName(decodeURIComponent(getQueryStringValue('foerening')))\r\n : (state.global.session.activeFoerening as number);\r\n\r\n let foereningName = decodeURIComponent(getQueryStringValue('foerening'));\r\n if (!foereningName) {\r\n const inloggade = state.global.session.inloggadeFoereningar.find(\r\n i => i.Id === state.global.session.activeFoerening\r\n );\r\n if (inloggade) {\r\n foereningName = inloggade.Namn;\r\n }\r\n } else {\r\n foereningName = constructSafeName(foereningName);\r\n }\r\n const harPass = state.passFilter.filteredPassIds.map(ids => ids.passIds.length).some(n => n !== 0);\r\n const traeningsstaelleFilter = state.passFilter.filter.Traeningsstaelle;\r\n const skaVisaTraeningsstaelleMeddelande =\r\n !!traeningsstaelleFilter &&\r\n traeningsstaelleFilter.vaerden.length > 3 &&\r\n !traeningsstaelleFilter.vaerden.some(v => {\r\n if (isFiltervalGrupp(v)) {\r\n return v.filterval.some(fv => fv.vald);\r\n } else {\r\n return v.vald;\r\n }\r\n });\r\n return {\r\n passInDay: state.passFilter.filteredPassIds,\r\n translate: getTranslate(state.locale),\r\n filterExpanded: state.passFilter.filterSynligt,\r\n aktivFoerening: state.global.session.activeFoerening,\r\n foereningName: foereningName,\r\n\r\n fetchPasslistStatus: getEntityStatus(state.global.fetch, passListFetchKey, FetchStatusAggregateTypes.PASS_LIST),\r\n numbersOfFilters:\r\n state.passFilter.flatFilter.LedareOrTraenare.length +\r\n state.passFilter.flatFilter.Tidpunkt.length +\r\n state.passFilter.flatFilter.Traeningspass.length +\r\n state.passFilter.flatFilter.Traeningsstaelle.length +\r\n state.passFilter.flatFilter.Veckodag.length,\r\n visarOverlay: !harPass || skaVisaTraeningsstaelleMeddelande,\r\n fritextTerm: state.passFilter.fritextTerm,\r\n ...props,\r\n };\r\n};\r\nconst mapDispatch = (dispatch: Dispatch, props: any): ScheduleActionProps => ({\r\n getPassList: (foereningsId: number, foereningsName?: string) => {\r\n dispatch(fetchPassListInForeground(foereningsId, foereningsName));\r\n },\r\n getPassListInBackground: (foereningId: number) => {\r\n return dispatch<\r\n Promise>; filter: PassFilterFiltrerbaraKategorier }> | ErrorResult>\r\n >(fetchPassListInBackground(foereningId));\r\n },\r\n setScheduleToWeekMode: () => {\r\n dispatch(passFilterVisaFilter(false));\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToWeek,\r\n viewShowing: UIScheduleViewType.WEEKVIEW,\r\n });\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MAXIMISED',\r\n size: SidebarSize.MAXIMISED,\r\n });\r\n },\r\n setFilterVisible: (visa: boolean) => {\r\n dispatch(passFilterVisaFilter(visa));\r\n },\r\n getBookings: () => {\r\n dispatch(getBookingsInBackground());\r\n },\r\n setFritextTerm: (filter: string) => {\r\n dispatch(passFilterSetFritextTerm(filter));\r\n },\r\n});\r\n\r\nexport default connect(mapState, mapDispatch)(Schedule);\r\n","import * as React from 'react';\r\nimport { lockBackgroundScroll, unlockBackgroundCallback } from 'websd/utils';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { PassListSkeleton } from 'components/common/pass-list-skeleton/PassListSkeleton';\r\n\r\nimport PassItemContainer from './pass-item/PassItemContainer';\r\nimport { SitecoreDictionary, Day } from 'models';\r\nimport ScheduleModeSwitcherContainer from '../schedule-mode-switcher/ScheduleModeSwitcherContainer';\r\nimport { PassHeader } from '.';\r\nimport { IconArrow } from 'components/icons';\r\nimport PassFilterContainer from '../../common/passFilter/PassFilterContainer';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport filtericon from '../../../static/assets/Filter.svg';\r\nimport { Spinner, MainInput } from 'components/common';\r\nimport PullToRefresh from 'react-simple-pull-to-refresh';\r\nimport { SuccessResult, ErrorResult } from 'websd/utils/configureApi';\r\nimport { PassFilterFiltrerbaraKategorier } from 'store/passFilter';\r\n\r\nconst PASS_COUNT_THRESHOLD = 50;\r\n\r\nexport interface ScheduleActionProps {\r\n getPassList: (foereningsId: number, foereningsName?: string) => void;\r\n getPassListInBackground: (\r\n foereningId: number\r\n ) => Promise<\r\n SuccessResult<{ pass: Array>; filter: PassFilterFiltrerbaraKategorier }> | ErrorResult\r\n >;\r\n setScheduleToWeekMode: () => void;\r\n setFilterVisible: (visible: boolean) => void;\r\n getBookings: () => void;\r\n setFritextTerm: (filter: string) => void;\r\n}\r\n\r\nexport interface ScheduleDataProps {\r\n isPublicWebMode: boolean;\r\n isDesktopMode: boolean;\r\n isFullDesktopView: boolean;\r\n}\r\n\r\nexport interface ScheduleOwnProps {\r\n passInDay: { day: string; passIds: string[] }[];\r\n translate: TranslateFunction;\r\n\r\n filterExpanded: boolean;\r\n aktivFoerening?: number;\r\n foereningName?: string;\r\n\r\n fetchPasslistStatus?: EntityStatus;\r\n numbersOfFilters: number;\r\n visarOverlay: boolean;\r\n\r\n fritextTerm: string;\r\n}\r\n\r\ntype ScheduleProps = ScheduleOwnProps & ScheduleDataProps & ScheduleActionProps;\r\n\r\nexport const Schedule: React.FunctionComponent = ({\r\n isPublicWebMode,\r\n isDesktopMode,\r\n isFullDesktopView,\r\n passInDay,\r\n translate,\r\n\r\n filterExpanded,\r\n aktivFoerening,\r\n foereningName,\r\n\r\n fetchPasslistStatus,\r\n numbersOfFilters,\r\n getPassList,\r\n getPassListInBackground,\r\n setScheduleToWeekMode,\r\n setFilterVisible,\r\n getBookings,\r\n visarOverlay,\r\n fritextTerm,\r\n setFritextTerm,\r\n}) => {\r\n const [unlockBackgroundScrollCallback, setUnlockBackgroundScrollCallback] = React.useState<\r\n unlockBackgroundCallback | undefined\r\n >(undefined);\r\n const [showPassForDay, setShowPassForDay] = React.useState<{ [day: string]: boolean }>({});\r\n const [totalNumberOfPass, setTotalNumberOfPass] = React.useState(-1);\r\n const [scrollRightPercent, setScrollRightPercent] = React.useState(0);\r\n const [shouldUpdateShownDays, setShouldUpdateShownDays] = React.useState(true);\r\n const [timeAtLastInput, setTimeAtLastInput] = React.useState(Date.now());\r\n\r\n const container = React.useRef(null);\r\n\r\n React.useEffect(() => {\r\n if (!aktivFoerening || isPublicWebMode) {\r\n return () => {};\r\n }\r\n const timeout = window.setTimeout(() => {\r\n getPassListInBackground(aktivFoerening);\r\n }, 10000);\r\n const interval = window.setInterval(() => {\r\n const now = Date.now();\r\n if (now - timeAtLastInput < 3 * 60500) {\r\n // 60.5 * 3 sekunder för att ha lite spelrum\r\n getPassListInBackground(aktivFoerening);\r\n }\r\n }, 60000);\r\n return () => {\r\n window.clearInterval(interval);\r\n window.clearTimeout(timeout);\r\n };\r\n }, [timeAtLastInput, aktivFoerening, isPublicWebMode, getPassListInBackground]);\r\n\r\n React.useEffect(() => {\r\n const resetTimer = () => {\r\n setTimeAtLastInput(Date.now());\r\n };\r\n\r\n window.addEventListener('click', resetTimer);\r\n window.addEventListener('touchstart', resetTimer);\r\n window.addEventListener('scroll', resetTimer, true);\r\n\r\n return () => {\r\n window.removeEventListener('click', resetTimer);\r\n window.removeEventListener('touchstart', resetTimer);\r\n window.removeEventListener('scroll', resetTimer, true);\r\n };\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (isPublicWebMode) {\r\n if (!isFullDesktopView) {\r\n setScheduleToWeekMode();\r\n }\r\n if (!!foereningName) {\r\n if (!hasOrIsFetchingPassList()) {\r\n getPassList(-1, foereningName);\r\n }\r\n }\r\n } else if (!!aktivFoerening) {\r\n if (!isDesktopMode) {\r\n lockBackground();\r\n getBookings();\r\n }\r\n if (!hasOrIsFetchingPassList()) {\r\n getPassListInBackground(aktivFoerening);\r\n }\r\n }\r\n\r\n return () => {\r\n if (!!unlockBackgroundScrollCallback) {\r\n unlockBackgroundScrollCallback();\r\n }\r\n };\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n let numberOfPass = 0;\r\n passInDay.forEach(v => (numberOfPass += v.passIds.length));\r\n setTotalNumberOfPass(numberOfPass);\r\n if (shouldUpdateShownDays) {\r\n const days = { ...showPassForDay };\r\n if (numberOfPass > PASS_COUNT_THRESHOLD) {\r\n passInDay.forEach(d => (days[d.day] = false));\r\n const firstDayWithPass = passInDay.find(p => p.passIds.length > 0);\r\n if (firstDayWithPass) {\r\n days[firstDayWithPass.day] = true;\r\n }\r\n } else {\r\n passInDay.forEach(d => (days[d.day] = true));\r\n }\r\n setShowPassForDay(days);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [passInDay]);\r\n\r\n const renderPassList = (): JSX.Element => {\r\n let firstVisibleHeaderRendered = false;\r\n return (\r\n \r\n {!isPublicWebMode && isDesktopMode && (\r\n \r\n {!filterExpanded && (\r\n \r\n {\r\n setFilterVisible(true);\r\n }}\r\n >\r\n \"Filter\"\r\n {numbersOfFilters > 0 && (\r\n \r\n {numbersOfFilters}\r\n \r\n )}\r\n \r\n \r\n )}\r\n

    {translate(SitecoreDictionary.Schedule.Schedule)}

    \r\n
    \r\n )}\r\n {!isPublicWebMode && isDesktopMode && }\r\n \r\n {\r\n const days = { ...showPassForDay };\r\n if (!passInDay.some(d => !days[d.day])) {\r\n // Stäng alla dagar temporärt för att inte rendera alla pass om alla dagarna råkar vara öppna\r\n passInDay.forEach(d => (days[d.day] = false));\r\n setShowPassForDay(days);\r\n }\r\n setFritextTerm(v as string);\r\n }}\r\n value={fritextTerm}\r\n className=\"Schedule__Fritext\"\r\n />\r\n {!visarOverlay && (\r\n {\r\n if (!aktivFoerening) {\r\n return Promise.resolve();\r\n }\r\n return getPassListInBackground(aktivFoerening);\r\n }}\r\n pullingContent={\r\n
    \r\n \r\n {translate(SitecoreDictionary.Schedule.PullToRefresh)}\r\n \r\n
    \r\n }\r\n refreshingContent={}\r\n isPullable={!isDesktopMode}\r\n >\r\n (container.current = r)}\r\n >\r\n
    \r\n {totalNumberOfPass > 0 && (\r\n {\r\n toggleDayExpanded(element, day);\r\n setShouldUpdateShownDays(false);\r\n (window as any).dataLayer.push({\r\n event: 'dateRange',\r\n forening: foereningName,\r\n });\r\n }}\r\n passInDay={passInDay}\r\n />\r\n )}\r\n {passInDay.map((day, index) => {\r\n const shouldShowPassToday = !filterExpanded && !!showPassForDay[day.day];\r\n const rend = (\r\n \r\n \r\n {\r\n toggleDayExpanded(e.currentTarget, day.day);\r\n setShouldUpdateShownDays(false);\r\n (window as any).dataLayer.push({\r\n event: 'dateRange',\r\n forening: foereningName,\r\n });\r\n }}\r\n >\r\n {day.day}\r\n
    \r\n {shouldShowPassToday &&\r\n day.passIds.map((passId, passIndex) => {\r\n return (\r\n \r\n );\r\n })}\r\n
    \r\n \r\n );\r\n if (day.passIds.length > 0 && !firstVisibleHeaderRendered) {\r\n firstVisibleHeaderRendered = true;\r\n }\r\n return rend;\r\n })}\r\n
    \r\n
    \r\n \r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n const renderPassSchedule = (): JSX.Element => {\r\n return (\r\n \r\n {

    {!isPublicWebMode && translate(SitecoreDictionary.Schedule.Schedule)}

    }\r\n {!isPublicWebMode && isDesktopMode && }\r\n \r\n (container.current = r)}\r\n onScroll={e => handleScroll(e)}\r\n >\r\n
    \r\n {passInDay.map((day, index) => {\r\n return (\r\n
    \r\n \r\n
    {day.day}
    \r\n {!visarOverlay &&\r\n day.passIds.map((passId, passIndex) => {\r\n return (\r\n \r\n );\r\n })}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n \r\n {!visarOverlay && passInDay.length > 7 && (\r\n \r\n {scrollRightPercent > 0 && (\r\n
    scrollToLeft()}>\r\n \r\n
    \r\n )}\r\n {scrollRightPercent < 1 && (\r\n
    scrollToRight()}>\r\n \r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n );\r\n };\r\n\r\n const toggleDayExpanded = (element: HTMLDivElement | null, day: string): void => {\r\n const showPass = { ...showPassForDay };\r\n const keys = Object.keys(showPass);\r\n const skaFaellasUt = !showPass[day];\r\n if (!skaFaellasUt) {\r\n showPass[day] = false;\r\n // Fäll ihop.\r\n setShowPassForDay(showPass);\r\n } else {\r\n if (totalNumberOfPass > PASS_COUNT_THRESHOLD) {\r\n // Stäng alla andra dagar\r\n keys.forEach(k => (showPass[k] = false));\r\n }\r\n showPass[day] = true;\r\n setShowPassForDay(showPass);\r\n }\r\n setTimeout(() => {\r\n const container = document.getElementById('Schedule__PassListContainer');\r\n if (!!container) {\r\n let top = 0;\r\n if (!!element) {\r\n top = element.offsetTop;\r\n } else {\r\n const index = keys.indexOf(day);\r\n top = index * 44; // dagar är 44 pixlar hög...\r\n }\r\n if (container.scrollTop >= top || skaFaellasUt) {\r\n container.scrollTo({ top: top });\r\n }\r\n }\r\n }, 1);\r\n };\r\n\r\n const handleScroll = (event: React.UIEvent) => {\r\n if (!event || !event.currentTarget) {\r\n return;\r\n }\r\n const eventTarget = event.currentTarget as HTMLDivElement;\r\n const scrollRight = eventTarget.scrollLeft / (eventTarget.scrollWidth - eventTarget.clientWidth);\r\n if (scrollRight === scrollRightPercent) {\r\n return;\r\n }\r\n setScrollRightPercent(scrollRight);\r\n };\r\n\r\n const scrollToLeft = () => {\r\n if (!!container.current) {\r\n let left = container.current.scrollLeft - (container.current.scrollWidth / passInDay.length) * 7;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n if (!!container.current.scrollTo) {\r\n container.current.scrollTo({ left: left, behavior: 'smooth' });\r\n } else {\r\n container.current.scrollLeft = left;\r\n }\r\n }\r\n };\r\n\r\n const scrollToRight = () => {\r\n if (!!container.current) {\r\n let left = container.current.scrollLeft + (container.current.scrollWidth / passInDay.length) * 7;\r\n if (left > container.current.scrollWidth) {\r\n left = container.current.scrollWidth;\r\n }\r\n if (!!container.current.scrollTo) {\r\n container.current.scrollTo({ left: left, behavior: 'smooth' });\r\n } else {\r\n container.current.scrollLeft = left;\r\n }\r\n }\r\n };\r\n\r\n const getClasses = (): string => {\r\n if (isPublicWebMode && isFullDesktopView) {\r\n return 'Schedule Schedule--Is-Desktop-Full-View-Mode';\r\n } else if (isFullDesktopView) {\r\n return 'Schedule Schedule--Is-Desktop-Full-View-Mode';\r\n } else if (isPublicWebMode) {\r\n return 'Schedule Schedule--Is-Desktop-List-Mode';\r\n }\r\n return 'Schedule Schedule--Is-Mobile-Mode';\r\n };\r\n\r\n const hasOrIsFetchingPassList = () => {\r\n return (\r\n !!fetchPasslistStatus &&\r\n (fetchPasslistStatus === EntityStatus.FETCHING_IN_BACKGROUND ||\r\n fetchPasslistStatus === EntityStatus.FETCHING ||\r\n fetchPasslistStatus === EntityStatus.SUCCESS ||\r\n fetchPasslistStatus === EntityStatus.FAILED)\r\n );\r\n };\r\n\r\n const hasNotOrIsFetchingPassListInForeground = () => {\r\n return (\r\n !fetchPasslistStatus || fetchPasslistStatus === EntityStatus.FETCHING || !passInDay || passInDay.length === 0\r\n );\r\n };\r\n\r\n const lockBackground = () => {\r\n const unlockBackground = lockBackgroundScroll();\r\n setUnlockBackgroundScrollCallback(unlockBackground);\r\n };\r\n\r\n if (!passInDay) {\r\n return null;\r\n }\r\n return (\r\n
    \r\n {hasNotOrIsFetchingPassListInForeground() && }\r\n {!hasNotOrIsFetchingPassListInForeground() && (\r\n \r\n {!isFullDesktopView && renderPassList()}\r\n {isFullDesktopView && renderPassSchedule()}\r\n \r\n )}\r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface Day {\r\n day: string;\r\n element: HTMLDivElement;\r\n}\r\n\r\nexport interface PassHeaderDataProps {\r\n onClick: (element: HTMLDivElement | null, day: string) => void;\r\n showPassForDay: { [day: string]: boolean };\r\n container: HTMLDivElement | null;\r\n passInDay: { day: string; passIds: string[] }[];\r\n}\r\n\r\nexport const PassHeader: React.FunctionComponent = ({\r\n onClick,\r\n showPassForDay,\r\n container,\r\n passInDay,\r\n}) => {\r\n const [topDay, setTopDay] = React.useState('');\r\n const [passListContainer, setPassListContainer] = React.useState(null);\r\n const [headerWidth, setHeaderWidth] = React.useState(0);\r\n const [days, setDays] = React.useState([]);\r\n\r\n const onScroll = React.useCallback(() => {\r\n if (!container) {\r\n return;\r\n }\r\n for (let i = days.length - 1; i >= 0; i--) {\r\n if (days[i].element === undefined) {\r\n continue;\r\n }\r\n if (\r\n days[i].element.parentElement !== null &&\r\n days[i].element.clientHeight > 0 &&\r\n days[i].element.offsetTop <= container.scrollTop\r\n ) {\r\n if (topDay !== days[i].day) {\r\n setTopDay(days[i].day);\r\n }\r\n return;\r\n }\r\n }\r\n }, [container, days, topDay]);\r\n\r\n const onResize = React.useCallback(() => {\r\n if (passListContainer) {\r\n setHeaderWidth(passListContainer.getBoundingClientRect().width);\r\n }\r\n }, [passListContainer, setHeaderWidth]);\r\n\r\n React.useEffect(() => {\r\n if (!!container) {\r\n const passListContainer = container.children[0] as HTMLDivElement;\r\n if (!!passListContainer) {\r\n const dayItems = passListContainer.children;\r\n const dayArray: Day[] = [];\r\n // Börja på 1, då den här komponenten (PassHeader) ligger som första child.\r\n // Sluta på dayItems.length - 1, då Padding ligger som sista child.\r\n for (let index = 1; index < dayItems.length - 1; index++) {\r\n const item = dayItems.item(index);\r\n if (!!item && item.childElementCount > 0) {\r\n const dayText = item.children[0].textContent;\r\n if (!!dayText) {\r\n dayArray.push({ day: dayText, element: item as HTMLDivElement });\r\n }\r\n }\r\n }\r\n setDays(dayArray);\r\n setPassListContainer(passListContainer);\r\n setHeaderWidth(passListContainer.getBoundingClientRect().width);\r\n setTopDay(dayArray[0].day);\r\n\r\n (dayItems[dayItems.length - 1] as HTMLDivElement).style.height = container.clientHeight - 44 + 'px';\r\n }\r\n }\r\n }, [container]);\r\n\r\n React.useEffect(() => {\r\n if (!!container) {\r\n container.addEventListener('scroll', onScroll);\r\n window.addEventListener('resize', onResize);\r\n onScroll();\r\n onResize();\r\n return () => {\r\n container.removeEventListener('scroll', onScroll);\r\n container.removeEventListener('resize', onResize);\r\n };\r\n }\r\n return () => {};\r\n }, [container, onScroll, onResize]);\r\n\r\n React.useEffect(() => {\r\n if (onScroll) {\r\n onScroll();\r\n }\r\n }, [onScroll, passInDay]);\r\n\r\n return (\r\n {\r\n const day = days.find(d => d.day === topDay);\r\n onClick(!!day ? day.element : null, topDay);\r\n }}\r\n >\r\n {topDay}\r\n \r\n );\r\n};\r\n","import { getApplicationViewModeIsDesktop } from 'store/global/ui/application-mode/applicationModeReducer';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { SchedulePage, SchedulePageDataProps, SchedulePageActionProps } from './schedulePage';\r\nimport { SidebarStatus, SideBarAction, SidebarSize } from 'store/global/ui/side-bar';\r\nimport { UIScheduleAction, UIScheduleActionType, UIScheduleViewType } from 'store/global/ui/schedule';\r\nimport { UIScheduleFilterActionType } from 'store/global/ui/schedule-filter';\r\n\r\nconst setScheduleToWeekView = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_LAUNCH',\r\n visibility: SidebarStatus.SHOWING,\r\n });\r\n dispatch({\r\n type: UIScheduleFilterActionType.SetFilterToMinimised,\r\n expanded: false,\r\n });\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToWeek,\r\n viewShowing: UIScheduleViewType.WEEKVIEW,\r\n });\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MAXIMISED',\r\n size: SidebarSize.MAXIMISED,\r\n });\r\n};\r\n\r\nconst setScheduleToListView = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_SIZE_MINIMISED',\r\n size: SidebarSize.MINIMISED,\r\n });\r\n dispatch({\r\n type: UIScheduleActionType.SetViewTypeToList,\r\n viewShowing: UIScheduleViewType.LISTVIEW,\r\n });\r\n};\r\n\r\nconst mapDataToProps = (state: RootState): SchedulePageDataProps => ({\r\n isDesktopMode: getApplicationViewModeIsDesktop(state),\r\n});\r\n\r\nconst mapActionToProps: SchedulePageActionProps = {\r\n setScheduleToWeekView,\r\n setScheduleToListView,\r\n};\r\n\r\nexport default connect(mapDataToProps, mapActionToProps)(SchedulePage);\r\n","import * as React from 'react';\r\nimport ScheduleContainer from 'components/schedule/schedule';\r\n\r\nexport interface SchedulePageDataProps {\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface SchedulePageActionProps {\r\n setScheduleToWeekView: () => void;\r\n setScheduleToListView: () => void;\r\n}\r\n\r\ntype SchedulePageProps = SchedulePageDataProps & SchedulePageActionProps;\r\n\r\nexport const SchedulePage: React.FunctionComponent = ({\r\n isDesktopMode,\r\n setScheduleToWeekView,\r\n setScheduleToListView,\r\n}) => {\r\n React.useEffect(() => {\r\n if (isDesktopMode) {\r\n return () => setScheduleToListView();\r\n }\r\n return () => {};\r\n //eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (isDesktopMode) {\r\n setScheduleToWeekView();\r\n }\r\n //eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isDesktopMode]);\r\n\r\n return isDesktopMode ? null : (\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { LocationState } from 'store/location';\r\nimport { Spinner } from '../../../common/Spinner';\r\nimport { StatusBar, MainButton } from '../../../common';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { addProductToOrder } from 'components/shop/Order/Order';\r\n\r\nimport { canAddProduct } from 'utils';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface ProductDetailsDataProps {\r\n isDesktopMode: boolean;\r\n products: Array;\r\n productsInBasket?: Array;\r\n location: LocationState;\r\n shopFoerening: number;\r\n foereningar: FoereningInternal[];\r\n translate: TranslateFunction;\r\n orderId: number;\r\n isPendingOrderChange: boolean;\r\n}\r\n\r\nexport interface ProductDetailsActionProps {\r\n addProduct: (product: fos.api.Product, foereningId: number) => void;\r\n}\r\n\r\nexport interface ProductDetailsState {\r\n statusMessageVisible: boolean;\r\n statusMessage: string;\r\n statusMessageClass: string;\r\n mainButtonDisabled: boolean;\r\n}\r\n\r\ntype ProductDetailsProps = ProductDetailsDataProps & ProductDetailsActionProps;\r\n\r\nexport class ProductDetails extends React.Component {\r\n constructor(props: ProductDetailsProps) {\r\n super(props);\r\n\r\n this.state = {\r\n statusMessageVisible: false,\r\n statusMessage: this.props.translate(SitecoreDictionary.Shop.ProductAddedToBasket) as string,\r\n statusMessageClass: 'StatusMessage--Green',\r\n mainButtonDisabled: false,\r\n };\r\n }\r\n\r\n UNSAFE_componentWillMount() {\r\n if (!!this.props.productsInBasket) {\r\n this.setState({\r\n ...this.state,\r\n mainButtonDisabled: this.checkIfInBasket(this.props.productsInBasket, this.findProductId()),\r\n });\r\n }\r\n }\r\n\r\n checkIfInBasket = (basket: fos.api.Product[], id: string) => {\r\n for (let i = 0; i < basket.length; i++) {\r\n if (String(basket[i].Id) === id) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n findProductId = () => {\r\n const path = this.props.location.pathname;\r\n return path.substring(path.lastIndexOf('/') + 1);\r\n };\r\n\r\n findCustomerType = () => {\r\n return this.props.location.query.customerType as string | undefined;\r\n };\r\n\r\n findProduct = () => {\r\n const productId = this.findProductId();\r\n const customerType = this.findCustomerType();\r\n const selectedProduct = this.props.products.find(\r\n item => '' + item.Id === '' + productId && '' + item.CustomerType.Id === '' + customerType\r\n );\r\n if (!selectedProduct && this.props.products.length > 0) {\r\n throw Error(\r\n 'Did not find product with Id \"' +\r\n productId +\r\n '\" and customerType \"' +\r\n customerType +\r\n '\". Valid products are: ' +\r\n JSON.stringify(this.props.products)\r\n );\r\n }\r\n return selectedProduct;\r\n };\r\n\r\n handleClick = (product: fos.api.Product) => {\r\n if (!this.props.shopFoerening) {\r\n return;\r\n }\r\n const canAdd = canAddProduct(\r\n product,\r\n this.props.translate,\r\n this.props.productsInBasket,\r\n this.props.isPendingOrderChange\r\n );\r\n if (canAdd.canAdd) {\r\n this.props.addProduct(product, this.props.shopFoerening);\r\n addProductToOrder(this.props.shopFoerening, this.props.orderId, product);\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: true,\r\n statusMessage: this.props.translate(SitecoreDictionary.Shop.ProductAddedToBasket) as string,\r\n statusMessageClass: 'StatusMessage--Green',\r\n mainButtonDisabled: true,\r\n });\r\n } else if (!!canAdd.message) {\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: true,\r\n statusMessage: canAdd.message,\r\n statusMessageClass: 'StatusMessage--Black',\r\n });\r\n }\r\n this.setStatusMessageTimeout();\r\n };\r\n\r\n setStatusMessageTimeout = () => {\r\n setTimeout(\r\n () =>\r\n this.setState({\r\n ...this.state,\r\n statusMessageVisible: false,\r\n }),\r\n 4500\r\n );\r\n };\r\n\r\n getButtonText = () => {\r\n if (this.state.mainButtonDisabled) {\r\n return this.props.translate(SitecoreDictionary.Shop.ProductExistsInBasket) as string;\r\n } else {\r\n return this.props.translate(SitecoreDictionary.Shop.AddToBasket) as string;\r\n }\r\n };\r\n\r\n render() {\r\n const displaySpinner = this.props.foereningar.length === 0 || this.props.products.length === 0;\r\n const product = this.findProduct();\r\n return (\r\n \r\n
    \r\n {displaySpinner && }\r\n {!displaySpinner && product && (\r\n \r\n
    \r\n
    \r\n \"Produktkort\"\r\n
    \r\n
    \r\n
    \r\n \r\n
    {product.Pris}:-
    \r\n {product.PaymentMethod === 'AutoGiro' && /mån}\r\n {product.NrOfMonths > 1 && product.PaymentMethod !== 'AutoGiro' && (\r\n \r\n ({Number((product.Pris / product.NrOfMonths).toFixed(0))}:- /mån)\r\n \r\n )}\r\n
    \r\n
    \r\n this.handleClick(product)}\r\n />\r\n \r\n
    \r\n {product.BeskrivningSitecore && (\r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n
    \r\n )}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import { RootState } from 'store';\r\nimport { connect } from 'react-redux';\r\nimport { ProductDetails, ProductDetailsDataProps, ProductDetailsActionProps } from './ProductDetails';\r\nimport {\r\n getIsExecuting,\r\n FetchCommandTypes,\r\n} from 'store/global/fetch';\r\nimport { addProduct } from 'store/basket';\r\nimport { getTranslate } from 'store/global/dictionary';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): ProductDetailsDataProps => {\r\n const foereningId = state.global.session.shopFoerening!;\r\n return {\r\n isDesktopMode: props.isDesktopMode,\r\n products: state.product.filteredProducts,\r\n productsInBasket: state.shoppingBasket.products,\r\n location: state.location,\r\n shopFoerening: foereningId,\r\n foereningar: state.foereningar.read.Foereningar,\r\n translate: getTranslate(state.locale),\r\n orderId: state.global.session.orderId!,\r\n isPendingOrderChange:\r\n getIsExecuting(state.global.fetch, '' + state.global.session.orderId, FetchCommandTypes.ADD_TO_ORDER) ||\r\n getIsExecuting(state.global.fetch, '' + state.global.session.orderId, FetchCommandTypes.REMOVE_FROM_ORDER),\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: ProductDetailsActionProps = {\r\n addProduct,\r\n};\r\n\r\nexport const ProductDetailsContainer = connect(mapStateToProps, mapDispatchToProps)(ProductDetails);\r\n","import * as React from 'react';\r\nimport { NewPassword } from 'components/common';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { LocationState } from 'store/location';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface AccountFormDataProps {\r\n translate: TranslateFunction;\r\n isDesktopMode: boolean;\r\n password: string;\r\n repeatPassword: string;\r\n isPasswordValid: boolean;\r\n isRepeatPasswordValid: boolean;\r\n location: LocationState;\r\n}\r\n\r\ninterface AccountFormActionProps {\r\n updatePassword: (value: string) => void;\r\n updateRepeatPassword: (value: string) => void;\r\n updatePasswordValidity: (isValid: boolean) => void;\r\n updateRepeatPasswordValidity: (isValid: boolean) => void;\r\n}\r\n\r\nexport type AccountFormProps = AccountFormDataProps & AccountFormActionProps;\r\n\r\nexport class AccountForm extends React.Component {\r\n\r\n render() {\r\n return (\r\n
    \r\n
    {this.props.translate(SitecoreDictionary.Cart.AccountTitle)}
    \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainInput, EmailInput, MainButton, StatusBar, Checkbox } from 'components/common';\r\n\r\nimport { SitecoreDictionary, PersonLookupStatus } from 'models';\r\nimport { Anlaeggning } from 'store/global/ui/anlaeggningar';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\ninterface MemberProfileFormDataProps {\r\n validateEmail: (isValid: boolean) => void;\r\n translate: TranslateFunction;\r\n ssn: string;\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n telephone: string;\r\n zipCode: string;\r\n city: string;\r\n street: string;\r\n hasNoSwedishSsn: boolean;\r\n emailIsValid?: boolean;\r\n anlaeggningsId: string;\r\n anlaeggningar: Array;\r\n lookupStatus?: PersonLookupStatus;\r\n foereningId?: number;\r\n hasDebitProductInBasket: boolean;\r\n}\r\n\r\nexport interface MemberProfileFormActionProps {\r\n updateSSN: (value: string) => void;\r\n updateFirstName: (value: string) => void;\r\n updateLastName: (value: string) => void;\r\n updateEmail: (value: string) => void;\r\n updateTelephone: (value: string) => void;\r\n updateStreet: (value: string) => void;\r\n updateZipCode: (value: string) => void;\r\n updateCity: (value: string) => void;\r\n updateHasNoSwedishSsn: (value: boolean) => void;\r\n getPersonLookup: (foereningId: number, ssn: string) => void;\r\n isSsnValid: (value: string, swedishSsn: boolean) => boolean;\r\n isPhonenumberValid: (value: string) => boolean;\r\n openLoginPrompt: () => void;\r\n}\r\n\r\nexport type MemberProfileProps = MemberProfileFormActionProps & MemberProfileFormDataProps;\r\n\r\nexport interface MemberProfileFormState {\r\n showErrorMessage: boolean;\r\n}\r\n\r\nexport class MemberProfileForm extends React.Component {\r\n constructor(props: MemberProfileProps) {\r\n super(props);\r\n this.state = {\r\n showErrorMessage: false,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: MemberProfileProps) {\r\n if (prevProps.lookupStatus !== this.props.lookupStatus) {\r\n this.setState({\r\n ...this.state,\r\n showErrorMessage:\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareAerRegistrerad ||\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareEjHittad,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n

    \r\n {this.props.translate(SitecoreDictionary.Cart.YourProfile) as string}\r\n

    \r\n {\r\n this.setState({ ...this.state, showErrorMessage: false });\r\n }}\r\n closeBtn={true}\r\n />\r\n \r\n this.handleSSNChange(value as string)}\r\n autocomplete=\"off\"\r\n isValid={this.props.isSsnValid(this.props.ssn, !this.props.hasNoSwedishSsn)}\r\n />\r\n {!!this.props.lookupStatus && !this.props.hasNoSwedishSsn && (\r\n {\r\n if (!!this.props.foereningId && this.props.isSsnValid(this.props.ssn, !this.props.hasNoSwedishSsn)) {\r\n this.props.getPersonLookup(this.props.foereningId, this.props.ssn);\r\n }\r\n }}\r\n />\r\n )}\r\n
    \r\n {\r\n \r\n {this.props.translate(SitecoreDictionary.Cart.HasNoSwedishSSN) as string}\r\n \r\n }\r\n {this.props.hasDebitProductInBasket && (\r\n

    {this.props.translate(SitecoreDictionary.Cart.DebitInfo)}

    \r\n )}\r\n {(this.props.lookupStatus === PersonLookupStatus.EjTillgaenglig ||\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad ||\r\n this.props.hasNoSwedishSsn) && (\r\n \r\n this.handleFirstNameChange(value as string)}\r\n isValid={this.props.firstName.length > 0}\r\n autocomplete=\"given-name\"\r\n />\r\n\r\n this.handleLastNameChange(value as string)}\r\n isValid={this.props.lastName.length > 0}\r\n autocomplete=\"last-name\"\r\n disabled={\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad && !this.props.hasNoSwedishSsn\r\n }\r\n />\r\n\r\n this.handleEmailChange(value as string)}\r\n onValidChanged={isValid => this.handleEmailIsValidChange(isValid)}\r\n isValid={this.props.emailIsValid}\r\n />\r\n\r\n this.handleTelephoneChange(value as string)}\r\n isValid={this.props.isPhonenumberValid(this.props.telephone)}\r\n autocomplete=\"tel\"\r\n />\r\n\r\n this.handleStreetChange(value as string)}\r\n isValid={this.props.street.length > 0}\r\n autocomplete=\"street-address\"\r\n disabled={\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad && !this.props.hasNoSwedishSsn\r\n }\r\n />\r\n\r\n
    \r\n this.handleZipCodeChange(value as string)}\r\n isValid={this.props.zipCode.length === 5}\r\n autocomplete=\"postal-code\"\r\n disabled={\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad && !this.props.hasNoSwedishSsn\r\n }\r\n />\r\n\r\n this.handleCityChange(value as string)}\r\n isValid={this.props.city.length > 0}\r\n autocomplete=\"\"\r\n disabled={\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad && !this.props.hasNoSwedishSsn\r\n }\r\n />\r\n
    \r\n
    \r\n )}\r\n \r\n );\r\n }\r\n private getPersonLookupErrorMessage(): React.ReactNode {\r\n if (this.props.lookupStatus === undefined) {\r\n return '';\r\n }\r\n switch (this.props.lookupStatus) {\r\n case PersonLookupStatus.AnvaendareAerRegistrerad:\r\n return (\r\n \r\n

    {this.props.translate(SitecoreDictionary.Cart.SSNLookup.PersonAlreadyExists)}

    \r\n \r\n {this.props.translate(SitecoreDictionary.Login.Login)}\r\n \r\n
    \r\n );\r\n case PersonLookupStatus.AnvaendareEjHittad:\r\n return this.props.translate(SitecoreDictionary.Cart.SSNLookup.PersonNotFound);\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n private handleSSNChange(ssn: string): void {\r\n this.props.updateSSN(ssn);\r\n }\r\n\r\n private handleFirstNameChange(firstName: string): void {\r\n this.props.updateFirstName(firstName);\r\n }\r\n\r\n private handleLastNameChange(lastName: string): void {\r\n this.props.updateLastName(lastName);\r\n }\r\n\r\n private handleEmailChange(email: string): void {\r\n this.props.updateEmail(email);\r\n }\r\n\r\n private handleCampaignChange(email: string): void {\r\n // this.props.updateEmail(email);\r\n }\r\n\r\n private handleEmailIsValidChange(emailIsValid: boolean) {\r\n this.props.validateEmail(emailIsValid);\r\n }\r\n\r\n private handleTelephoneChange(telephone: string): void {\r\n this.props.updateTelephone(telephone);\r\n }\r\n\r\n private handleStreetChange(street: string): void {\r\n this.props.updateStreet(street);\r\n }\r\n\r\n private handleZipCodeChange(zipCode: string): void {\r\n this.props.updateZipCode(zipCode);\r\n }\r\n\r\n private handleCityChange(city: string): void {\r\n this.props.updateCity(city);\r\n }\r\n\r\n private containsOnlyNumber(value: string): boolean {\r\n return /^\\d+$/.test(value);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AccountForm } from './AccountForm';\r\nimport { MemberProfileForm } from './MemberProfileForm';\r\n\r\nimport { FormContainer } from '../formContainer';\r\nimport { SitecoreDictionary, PersonLookupStatus } from 'models';\r\nimport { MainButton, Spinner } from 'components/common';\r\nimport { TermsCheckbox } from 'components/shoppingBasket/forms/TermsCheckbox';\r\nimport { CreateUserState } from 'store/user/createUserCmd';\r\nimport { StatusBar } from 'components/common';\r\nimport { getShoppingBasketError } from 'models/SitecoreDictionary';\r\nimport { LocationState } from 'store/location';\r\nimport { Anlaeggning } from 'store/global/ui/anlaeggningar/anlaeggningarReducer';\r\nimport { TermsCheckboxSmsEmail } from '..';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { EntityStatus } from 'store/global/fetch';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nexport interface NewUserFormInternalProps {\r\n isDesktopMode: boolean;\r\n}\r\n\r\nexport interface NewUserFormDataProps {\r\n translate: TranslateFunction;\r\n personnr: string;\r\n anlaeggningsId: string;\r\n foernamn: string;\r\n efternamn: string;\r\n epost: string;\r\n mobiltelefonnr: string;\r\n gata: string;\r\n postkod: string;\r\n stad: string;\r\n loesenord: string;\r\n loesenordRepeat: string;\r\n hasNoSwedishSsn: boolean;\r\n isExecutingFailed: boolean;\r\n errorMessages?: string[];\r\n basket?: fos.api.Product[];\r\n foereningId?: number;\r\n anlaeggningar: Array;\r\n location: LocationState;\r\n lookupStatus?: PersonLookupStatus;\r\n hasDebitProductInBasket: boolean;\r\n fetchStateAnlaeggningar?: EntityStatus;\r\n isCreatingUser: boolean;\r\n}\r\nexport interface NewUserFormActionProps {\r\n createUser: (user: CreateUserState) => void;\r\n updateSSN: (value: string) => void;\r\n updateAnlaeggningsId: (value: string) => void;\r\n updateFirstName: (value: string) => void;\r\n updateLastName: (value: string) => void;\r\n updateEmail: (value: string) => void;\r\n updateTelephone: (value: string) => void;\r\n updateStreet: (value: string) => void;\r\n updateZipCode: (value: string) => void;\r\n updateCity: (value: string) => void;\r\n updatePassword: (value: string) => void;\r\n updateRepeatPassword: (value: string) => void;\r\n updateHasNoSwedishSsn: (value: boolean) => void;\r\n getPersonLookupAvailable: (foereningId: number) => void;\r\n getPersonLookup: (foereningId: number, ssn: string) => void;\r\n setSiteSwitcherToVisible: () => void;\r\n fetchAnlaeggningar: () => void;\r\n}\r\n\r\ninterface NewUserFormState {\r\n termsAccepted: boolean;\r\n gdprTermsAccepted: boolean;\r\n isEmailValid: boolean;\r\n isStatusBarVisible: boolean;\r\n isPasswordValid: boolean;\r\n isRepeatPasswordValid: boolean;\r\n}\r\n\r\nconst initialState: NewUserFormState = {\r\n termsAccepted: false,\r\n gdprTermsAccepted: false,\r\n isEmailValid: false,\r\n isStatusBarVisible: false,\r\n isPasswordValid: false,\r\n isRepeatPasswordValid: false,\r\n};\r\n\r\nexport type NewUserFormProps = NewUserFormActionProps & NewUserFormDataProps & NewUserFormInternalProps;\r\n\r\nexport class NewUserForm extends React.Component {\r\n errorStatusClass = 'StatusMessage--BlackRoundedCorners';\r\n constructor(props: NewUserFormProps) {\r\n super(props);\r\n this.state = initialState;\r\n\r\n this.validateEmail = this.validateEmail.bind(this);\r\n this.updatePasswordValidity = this.updatePasswordValidity.bind(this);\r\n this.updateRepeatPasswordValidity = this.updateRepeatPasswordValidity.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n if (!this.props.fetchStateAnlaeggningar || this.props.fetchStateAnlaeggningar === EntityStatus.INITIAL) {\r\n this.props.fetchAnlaeggningar();\r\n }\r\n if (!!this.props.foereningId) {\r\n this.props.getPersonLookupAvailable(this.props.foereningId);\r\n }\r\n if (!this.props.fetchStateAnlaeggningar || this.props.fetchStateAnlaeggningar === EntityStatus.INITIAL) {\r\n this.props.fetchAnlaeggningar();\r\n }\r\n if (this.props.anlaeggningar.length === 1) {\r\n this.props.updateAnlaeggningsId(this.props.anlaeggningar[0].AnlaeggningId);\r\n }\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(newProps: NewUserFormProps) {\r\n if (newProps.isExecutingFailed) {\r\n this.setState({\r\n isStatusBarVisible: true,\r\n });\r\n }\r\n return true;\r\n }\r\n\r\n componentDidUpdate(prevProps: NewUserFormProps) {\r\n if (!this.props.fetchStateAnlaeggningar || this.props.fetchStateAnlaeggningar === EntityStatus.INITIAL) {\r\n this.props.fetchAnlaeggningar();\r\n }\r\n if (!prevProps.foereningId && !!this.props.foereningId && this.props.lookupStatus === undefined) {\r\n this.props.getPersonLookupAvailable(this.props.foereningId);\r\n }\r\n if (!this.props.fetchStateAnlaeggningar || this.props.fetchStateAnlaeggningar === EntityStatus.INITIAL) {\r\n this.props.fetchAnlaeggningar();\r\n }\r\n\r\n if (\r\n this.props.anlaeggningar.length > prevProps.anlaeggningar.length ||\r\n (!!this.props.anlaeggningar && !prevProps.anlaeggningar)\r\n ) {\r\n if (this.props.anlaeggningar.length === 1) {\r\n this.props.updateAnlaeggningsId(this.props.anlaeggningar[0].AnlaeggningId);\r\n }\r\n }\r\n }\r\n\r\n showStatusBar() {\r\n if (this.state.isStatusBarVisible) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n validateEmail(isValid: boolean) {\r\n this.setState({ isEmailValid: isValid });\r\n }\r\n\r\n render() {\r\n if (this.props.lookupStatus === undefined) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n this.submit(event)}\r\n >\r\n \r\n {(this.props.lookupStatus === PersonLookupStatus.EjTillgaenglig ||\r\n this.props.lookupStatus === PersonLookupStatus.AnvaendareHittad ||\r\n this.props.hasNoSwedishSsn) && (\r\n \r\n \r\n {this.props.anlaeggningar.length > 1 && (\r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n this.updateTermsAccepted(newValue as boolean)}\r\n isDesktopMode={this.props.isDesktopMode}\r\n translate={this.props.translate}\r\n />\r\n this.updateGdprTermsAccepted(newValue as boolean)}\r\n isDesktopMode={this.props.isDesktopMode}\r\n translate={this.props.translate}\r\n />\r\n {!this.props.isCreatingUser && (\r\n this.onContinueToPayment()}\r\n />\r\n )}\r\n {this.props.isCreatingUser && }\r\n {this.showStatusBar() && this.props.errorMessages && this.props.errorMessages.length > 0 && (\r\n
    \r\n \r\n {this.props.errorMessages.map((error, index) => (\r\n \r\n  - \r\n {this.props.translate(getShoppingBasketError(error)) as string}\r\n {(index !== (!!this.props.errorMessages ? this.props.errorMessages.length - 1 : 0) ||\r\n (!!this.props.errorMessages &&\r\n !!this.props.errorMessages.find(\r\n e =>\r\n e === 'EPOST_ALREADY_EXISTS' ||\r\n e === 'PERSONNR_ALREADY_EXISTS' ||\r\n e === 'UserAlreadyExistsInMittFriskis'\r\n ))) && (\r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n ))}\r\n {!!this.props.errorMessages.find(\r\n e =>\r\n e === 'EPOST_ALREADY_EXISTS' ||\r\n e === 'PERSONNR_ALREADY_EXISTS' ||\r\n e === 'UserAlreadyExistsInMittFriskis'\r\n ) && (\r\n \r\n \r\n
    {this.props.translate(SitecoreDictionary.Login.Login)}
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n }\r\n cssClass={this.errorStatusClass}\r\n />\r\n \r\n )}\r\n {this.showStatusBar() && (!this.props.errorMessages || this.props.errorMessages.length === 0) && (\r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n )}\r\n \r\n
    \r\n );\r\n }\r\n\r\n onContinueToPayment() {\r\n this.props.createUser({\r\n personnr: this.props.personnr,\r\n foernamn: this.props.foernamn,\r\n efternamn: this.props.efternamn,\r\n epost: this.props.epost,\r\n mobiltelefonnr: this.props.mobiltelefonnr,\r\n postkod: this.props.postkod,\r\n stad: this.props.stad,\r\n loesenord: this.props.loesenord,\r\n loesenordRepeat: this.props.loesenordRepeat,\r\n gata: this.props.gata,\r\n gdprTermsAccepted: this.state.gdprTermsAccepted,\r\n anlaeggningsId: this.props.anlaeggningsId,\r\n hasNoSwedishSsn: this.props.hasNoSwedishSsn,\r\n });\r\n }\r\n\r\n private updateTermsAccepted(newValue: boolean) {\r\n this.setState({\r\n ...this.state,\r\n termsAccepted: newValue,\r\n });\r\n }\r\n\r\n private updateGdprTermsAccepted(newValue: boolean) {\r\n this.setState({\r\n ...this.state,\r\n gdprTermsAccepted: newValue,\r\n });\r\n }\r\n\r\n private submit(event: React.FormEvent): void {\r\n event.preventDefault();\r\n }\r\n\r\n private shouldDisable(): boolean {\r\n const isPersonnrValid = this.isSsnValid(this.props.personnr, !this.props.hasNoSwedishSsn);\r\n const isFoernamnValid = this.props.foernamn.length > 0;\r\n const isEfternamnValid = this.props.efternamn.length > 0;\r\n const isMobiltelefonnrValid = this.isPhonenumberValid(this.props.mobiltelefonnr);\r\n\r\n const isGataValid = this.props.gata.length > 0;\r\n const isPostkodValid = this.props.postkod.length === 5;\r\n const isStadValid = this.props.stad.length > 0;\r\n const hasSelectedTraeningsstaelle = this.props.anlaeggningsId !== '0';\r\n return !(\r\n isPersonnrValid &&\r\n isFoernamnValid &&\r\n isEfternamnValid &&\r\n isMobiltelefonnrValid &&\r\n isGataValid &&\r\n isPostkodValid &&\r\n isStadValid &&\r\n this.state.isPasswordValid &&\r\n this.state.isRepeatPasswordValid &&\r\n this.state.isEmailValid &&\r\n this.state.termsAccepted &&\r\n hasSelectedTraeningsstaelle\r\n );\r\n }\r\n\r\n private isSsnValid(value: string, swedishSsn: boolean): boolean {\r\n return swedishSsn\r\n ? /^(19|20)?\\d\\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])-?\\d{4}$/.test(value)\r\n : /^(19|20)?\\d\\d-?(0[1-9]|1[012])-?(0[1-9]|[12][0-9]|3[01])$/.test(value);\r\n }\r\n\r\n private isPhonenumberValid(value: string): boolean {\r\n return /^\\+?\\d{9,12}$/.test(value);\r\n }\r\n\r\n private updatePasswordValidity(isPasswordValid: boolean) {\r\n this.setState({ isPasswordValid });\r\n }\r\n\r\n private updateRepeatPasswordValidity(isRepeatPasswordValid: boolean) {\r\n this.setState({ isRepeatPasswordValid });\r\n }\r\n\r\n private anlaeggningChanged(event: React.FormEvent) {\r\n this.props.updateAnlaeggningsId(event.currentTarget.value);\r\n }\r\n}\r\n","import { RootState, Dispatch } from 'store';\r\nimport { NewUserFormActionProps, NewUserFormDataProps, NewUserForm, NewUserFormInternalProps } from './NewUserForm';\r\nimport { connect } from 'react-redux';\r\nimport { createUser } from 'store/basket';\r\nimport {\r\n updateSSN,\r\n updateAnlaeggningsId,\r\n updateFirstName,\r\n updateLastName,\r\n updateEmail,\r\n updateTelephone,\r\n updateStreet,\r\n updateZipCode,\r\n updateCity,\r\n updatePassword,\r\n updateRepeatPassword,\r\n updateHasNoSwedishSsn,\r\n} from 'store/user/createUserCmd';\r\nimport {\r\n FetchCommandTypes,\r\n getIsExecutingFailed,\r\n getEntityStatus,\r\n FetchStatusAggregateTypes,\r\n getIsExecuting,\r\n} from 'store/global/fetch';\r\nimport { getPersonLookup, getPersonLookupAvailable } from 'store/user';\r\nimport { ProductPaymentMethod } from 'models';\r\nimport { SiteSwitcherAction, SiteSwitcherStatus } from 'store/global/ui/siteswitcher';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { fetchAnlaeggningar } from 'store/global/ui/anlaeggningar';\r\n\r\nconst setSiteSwitcherToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW',\r\n visibility: SiteSwitcherStatus.SHOWING,\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: NewUserFormInternalProps): NewUserFormDataProps => ({\r\n foereningId: state.global.session.shopFoerening,\r\n location: state.location,\r\n personnr: state.user.createUserCmd.personnr,\r\n foernamn: state.user.createUserCmd.foernamn,\r\n efternamn: state.user.createUserCmd.efternamn,\r\n epost: state.user.createUserCmd.epost,\r\n mobiltelefonnr: state.user.createUserCmd.mobiltelefonnr,\r\n gata: state.user.createUserCmd.gata,\r\n postkod: state.user.createUserCmd.postkod,\r\n stad: state.user.createUserCmd.stad,\r\n loesenord: state.user.createUserCmd.loesenord,\r\n loesenordRepeat: state.user.createUserCmd.loesenordRepeat,\r\n hasNoSwedishSsn: state.user.createUserCmd.hasNoSwedishSsn,\r\n isExecutingFailed: getIsExecutingFailed(state.global.fetch, '-1', FetchCommandTypes.SKAPA_ANVAENDARE),\r\n errorMessages:\r\n state.shoppingBasket.errorsOnCreatePayment ||\r\n state.shoppingBasket.errorsOnCreateUser ||\r\n (!!state.shoppingBasket.errorOnPurchase ? [state.shoppingBasket.errorOnPurchase] : undefined),\r\n basket: state.shoppingBasket.products,\r\n anlaeggningsId: state.user.createUserCmd.anlaeggningsId,\r\n anlaeggningar: state.global.ui.anlaeggningar.anlaeggningar,\r\n lookupStatus: state.user.createUserCmd.lookupStatus,\r\n hasDebitProductInBasket: !!state.shoppingBasket.products.find(p => p.PaymentMethod === ProductPaymentMethod.AutoGiro),\r\n translate: getTranslate(state.locale),\r\n fetchStateAnlaeggningar: getEntityStatus(state.global.fetch, -1, FetchStatusAggregateTypes.ANLAEGGNINGAR),\r\n isCreatingUser: getIsExecuting(state.global.fetch, '-1', FetchCommandTypes.SKAPA_ANVAENDARE),\r\n});\r\n\r\nconst mapActionsToProps: NewUserFormActionProps = {\r\n updateSSN,\r\n updateAnlaeggningsId,\r\n updateFirstName,\r\n updateLastName,\r\n updateEmail,\r\n updateTelephone,\r\n updateStreet,\r\n updateZipCode,\r\n updateCity,\r\n updatePassword,\r\n updateRepeatPassword,\r\n updateHasNoSwedishSsn,\r\n createUser,\r\n getPersonLookupAvailable,\r\n getPersonLookup,\r\n setSiteSwitcherToVisible: setSiteSwitcherToVisible,\r\n fetchAnlaeggningar,\r\n};\r\n\r\nexport const NewUserFormContainer = connect(mapStateToProps, mapActionsToProps)(NewUserForm);\r\n","import { ThunkAction } from 'store';\r\nimport { Anlaeggning } from './anlaeggningarReducer';\r\nimport { api } from 'api';\r\nimport { getAnlaeggningar } from './anlaeggningarAction';\r\nimport { fetching, FetchStatusAggregateTypes, fetched, fetchedFailed } from 'store/global/fetch';\r\n\r\nexport const fetchAnlaeggningar = (): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n let foereningId: number;\r\n if (!!state.shoppingBasket.foereningId) {\r\n foereningId = state.shoppingBasket.foereningId;\r\n } else if (!!state.global.session.shopFoerening) {\r\n foereningId = state.global.session.shopFoerening;\r\n } else if (!!state.global.session.activeFoerening) {\r\n foereningId = state.global.session.activeFoerening;\r\n } else {\r\n return;\r\n }\r\n dispatch(fetching(-1, FetchStatusAggregateTypes.ANLAEGGNINGAR));\r\n return api\r\n .get>(`Foerening/GetAnlaeggningar?foereningId=${foereningId}`, {\r\n anonymousCall: true,\r\n })\r\n .then(res => {\r\n if (!res.error) {\r\n dispatch(getAnlaeggningar(res.result));\r\n dispatch(fetched(-1, FetchStatusAggregateTypes.ANLAEGGNINGAR, res.result));\r\n } else {\r\n dispatch(fetchedFailed(-1, FetchStatusAggregateTypes.ANLAEGGNINGAR));\r\n }\r\n });\r\n};\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\n\r\nimport { Location } from 'store/location/locationModels';\r\nimport { LocationActionTypes as RouteActionType } from 'store/location/locationActions';\r\nimport { getLocation, goBack } from 'store/location';\r\nimport Profile from 'components/settings/profile';\r\nimport Start from '../start';\r\nimport Login from '../login/LoginContainer';\r\nimport AdminLogin from '../adminLogin/AdminLoginContainer';\r\nimport NotFound from './NotFoundContainer';\r\nimport RequestResetPasswordContainer from 'components/request-password-reset';\r\nimport Settings, { SettingsPages } from 'components/settings';\r\n// import Profile from '../settings/profile';\r\nimport PaymentSettings from '../settings/paymentSettings';\r\nimport TrainingPreferences from '../settings/trainingpreferences';\r\nimport SubscriptionsAndCardsContainer from 'components/subscriptionsAndCards';\r\nimport PassDetailsContainer from '../pass-details';\r\nimport UserAccount from 'components/settings/userAccount';\r\nimport { ShoppingBasketContainer } from 'components/shoppingBasket';\r\nimport { FacilitiesContainer } from 'components/facilities/';\r\nimport News from '../news/';\r\nimport { PaymentContainer } from 'components/payment';\r\nimport { ReceiptContainer } from 'components/receipt';\r\nimport BookingsContainer from '../bookings/';\r\nimport { ShopContainer } from 'components/shop';\r\nimport Notifications from '../notifications/';\r\nimport NotificationSettings from 'components/settings/notification-settings';\r\nimport CalendarSync from 'components/settings/calendarSync';\r\nimport Statistics from '../statistics/';\r\nimport ResetPassword from 'components/reset-password';\r\nimport SchedulePage from 'components/schedulePage';\r\nimport { ProductDetailsContainer } from 'components/shop/Products/product-details/ProductDetailsContainer';\r\nimport { NewUserFormContainer } from 'components/shoppingBasket/forms/newUserForm';\r\nimport ScheduleContainer from 'components/schedule/schedule';\r\nimport { ShopWrapperContainer } from 'components/shop';\r\n\r\nconst NotFoundElementSync = ;\r\nconst LoginPage = ;\r\nconst AdminLoginPage = ;\r\nconst RequestResetPasswordPage = ;\r\nconst SubscriptionsPage = ;\r\nconst FacilitiesPage = ;\r\nconst NewsPage = ;\r\nconst PaymentPage = ;\r\nconst ResetPasswordPage = ;\r\n\r\ninterface SwitchPageDataProps {\r\n location: Location;\r\n isDesktopMode: boolean;\r\n isPublicWebMode: boolean;\r\n isDesktopFullViewMode: boolean;\r\n}\r\n\r\ninterface SwitchPageActionProps {\r\n goBack: () => void;\r\n}\r\n\r\ntype SwitchPageProps = Readonly;\r\n\r\nexport const SwitchPage: React.SFC = (props: SwitchPageProps) => {\r\n const {\r\n location,\r\n // authenticated,\r\n isDesktopMode,\r\n isPublicWebMode,\r\n isDesktopFullViewMode,\r\n } = props;\r\n switch (location.type) {\r\n case RouteActionType.Home:\r\n return ; // :\r\n // authenticated ?\r\n // LoginPage;\r\n case RouteActionType.Login:\r\n return LoginPage;\r\n case RouteActionType.AdminLogin:\r\n return AdminLoginPage;\r\n case RouteActionType.Schedule:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n );\r\n case RouteActionType.PublicSchedule:\r\n return (\r\n \r\n );\r\n case RouteActionType.Reset:\r\n return RequestResetPasswordPage;\r\n case RouteActionType.Settings:\r\n return ;\r\n case RouteActionType.Settings_Profile:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n case RouteActionType.Settings_UserAccount:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n case RouteActionType.Settings_PaymentSettings:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n case RouteActionType.Settings_NotificationSettings:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n\r\n case RouteActionType.Settings_CalendarSyncSettings:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n case RouteActionType.Settings_TrainingPreferences:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n case RouteActionType.Bookings:\r\n return ;\r\n case RouteActionType.Subscriptions:\r\n return SubscriptionsPage;\r\n case RouteActionType.PassDetails:\r\n return isDesktopMode ? (\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n );\r\n case RouteActionType.ShoppingBasket:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.PublicShoppingBasket:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.PublicProductDetails:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.AdminShoppingBasket:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.AdminProductDetails:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.Facilities:\r\n return FacilitiesPage;\r\n case RouteActionType.News:\r\n return NewsPage;\r\n case RouteActionType.Payment:\r\n return PaymentPage;\r\n case RouteActionType.Shop:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.AdminShop:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.PublicRegister:\r\n return (\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n case RouteActionType.AdminRegister:\r\n return (\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n );\r\n case RouteActionType.ProductDetails:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.PublicShop:\r\n return (\r\n \r\n \r\n \r\n );\r\n case RouteActionType.Notifications:\r\n return ;\r\n case RouteActionType.Statistics:\r\n return ;\r\n case RouteActionType.ResetPassword:\r\n return ResetPasswordPage;\r\n case RouteActionType.Receipt:\r\n return ;\r\n default:\r\n return NotFoundElementSync;\r\n }\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: any): SwitchPageDataProps => ({\r\n location: getLocation(state.location),\r\n // authenticated: state.auth.read.isAuthenticated,\r\n isDesktopMode: props.isDesktopMode,\r\n isPublicWebMode: props.isPublicWebMode,\r\n isDesktopFullViewMode: props.isDesktopFullViewMode,\r\n});\r\n\r\nconst mapActionsToProps: SwitchPageActionProps = {\r\n goBack: goBack,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapActionsToProps)(SwitchPage);\r\n","import * as React from 'react';\r\n\r\ninterface MobileHeaderContentProps {\r\n title: string | null;\r\n}\r\n\r\nexport const MobileHeaderContent: React.SFC = props => {\r\n return
    {props.title}
    ;\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface MainMenuListItemProps {\r\n className?: string;\r\n showIcon?: boolean;\r\n icon?: React.ReactNode;\r\n text: string | React.ReactNode;\r\n showSeperator?: boolean;\r\n reverse?: boolean;\r\n newEventsCount?: number;\r\n onClick?: (val: boolean) => void;\r\n setAccountMenu?: (val: boolean) => void;\r\n}\r\n\r\nexport const MainMenuListItem: React.SFC = props => {\r\n return (\r\n (props.onClick ? props.onClick(true) : null)}\r\n className={(props.className ? props.className : '') + (props.reverse ? ' row-reversed' : '') + ' row'}\r\n >\r\n {props.showIcon &&
    {props.icon}
    }\r\n
    {props.text}
    \r\n {!!props.newEventsCount && props.newEventsCount > 0 &&
    {props.newEventsCount}
    }\r\n {props.showSeperator &&
    }\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport {\r\n IconMenuSettings,\r\n IconMenuMembership,\r\n IconMenuStatistics,\r\n IconMenuBookedSessions,\r\n IconMenuNotifications,\r\n IconProfile,\r\n} from 'components/icons/index';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as LocationAction } from 'store/location/locationActions';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { MainMenuListItem } from './MainMenuListItem';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface MainMenuListAccountActionProps {\r\n onClick?: (val: boolean) => void;\r\n}\r\n\r\nexport interface MainMenuListAccountState {\r\n accountMenu?: boolean;\r\n}\r\n\r\nexport interface MainMenuListAccountDataProps {\r\n translate: TranslateFunction;\r\n newNotificationsCount?: number;\r\n setAccountMenu: (val: boolean) => void;\r\n logout: () => void;\r\n}\r\n\r\nexport type MainMenuListAccountProps = MainMenuListAccountState &\r\n MainMenuListAccountActionProps &\r\n MainMenuListAccountDataProps;\r\n\r\nexport class MainMenuListAccount extends React.Component {\r\n render() {\r\n return (\r\n
    \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Settings) as string}\r\n onClick={() => this.props.setAccountMenu(true)}\r\n />\r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Subscriptions) as string}\r\n onClick={() => this.props.setAccountMenu(true)}\r\n />\r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.TrainingStatistics) as string}\r\n onClick={() => this.props.setAccountMenu(true)}\r\n />\r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Notifications) as string}\r\n newEventsCount={this.props.newNotificationsCount}\r\n onClick={() => this.props.setAccountMenu(true)}\r\n />\r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Bookings) as string}\r\n onClick={() => this.props.setAccountMenu(true)}\r\n />\r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.Profile.Logout) as string}\r\n onClick={() => this.props.logout()}\r\n />\r\n
    \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MainMenuListItem } from './MainMenuListItem';\r\nimport { IconMenuSwitch } from 'components/icons';\r\n\r\ninterface FoereningSwitcherItemDataProps {\r\n className?: string;\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n}\r\n\r\ninterface FoereningSwitcherItemActionProps {\r\n showFoereningSwitcher: () => void;\r\n}\r\n\r\nexport type FoereningSwitcherItemProps = FoereningSwitcherItemDataProps & FoereningSwitcherItemActionProps;\r\n\r\nexport const FoereningSwitcherItem: React.SFC = props => {\r\n return (\r\n
    \r\n (props.availableFoereningar.length > 1 ? props.showFoereningSwitcher() : null)}\r\n className=\"facility\"\r\n reverse={props.availableFoereningar.length > 1}\r\n showIcon={props.availableFoereningar.length > 1}\r\n showSeperator={true}\r\n text={\r\n \r\n {!!props.currentFoerening.DisplayName ? props.currentFoerening.DisplayName : props.currentFoerening.Namn}\r\n \r\n }\r\n icon={}\r\n />\r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nexport const IconFriskisGo: React.FunctionComponent = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n G\r\n \r\n o\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { IconMenuFriskis, IconMenuFacility, IconMenuNews, IconMenuCalendar } from 'components/icons';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { LocationActionTypes as LocationAction } from 'store/location/locationActions';\r\n\r\nimport { SitecoreDictionary } from 'models';\r\nimport { MainMenuListItem } from './MainMenuListItem';\r\nimport { FoereningSwitcherItem } from './FoereningSwitcherItem';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { Mobile, isApp } from 'models/app/MobileOSType';\r\nimport { IconFriskisGo } from 'components/icons/IconFriskisGo';\r\n\r\nexport interface MainMenuListWorkoutActionProps {\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n showFoereningSwitcher: () => void;\r\n goToSchedule: () => void;\r\n onClick?: (val: boolean) => void;\r\n}\r\n\r\nexport interface MainMenuListWorkoutState {\r\n workoutMenu?: boolean;\r\n}\r\n\r\nexport interface MainMenuListWorkoutDataProps {\r\n translate: TranslateFunction;\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n isDesktopMode: boolean;\r\n isTargetBlank?: string;\r\n getFoereningUrl: string;\r\n onlineTrainingUrl?: string;\r\n setWorkoutMenu: (val: boolean) => void;\r\n}\r\n\r\nexport type MainMenuListWorkoutProps = MainMenuListWorkoutActionProps &\r\n MainMenuListWorkoutState &\r\n MainMenuListWorkoutDataProps;\r\n\r\nexport class MainMenuListWorkout extends React.Component {\r\n onScheduleClick() {\r\n if (this.props.isDesktopMode) {\r\n this.props.openSidebarSchedule();\r\n this.props.showSidebar();\r\n } else {\r\n this.props.goToSchedule();\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Friskis)}\r\n onClick={() => this.props.setWorkoutMenu(true)}\r\n />\r\n \r\n {isApp() && (\r\n }\r\n text={'Friskis Go'}\r\n onClick={() => {\r\n Mobile.openFriskisGo();\r\n }}\r\n />\r\n )}\r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Facilities)}\r\n onClick={() => this.props.setWorkoutMenu(true)}\r\n />\r\n \r\n \r\n }\r\n text={this.props.translate(SitecoreDictionary.MainMenu.News)}\r\n onClick={() => this.props.setWorkoutMenu(true)}\r\n />\r\n \r\n this.onScheduleClick()}\r\n showIcon={true}\r\n icon={}\r\n text={this.props.translate(SitecoreDictionary.MainMenu.Schedule)}\r\n />\r\n
    \r\n );\r\n }\r\n}\r\n","import { TranslateFunction } from 'react-localize-redux';\r\nimport { connect } from 'react-redux';\r\nimport { Dispatch } from 'redux';\r\nimport { RootState } from './../../../store';\r\nimport {\r\n MainMenuListWorkout,\r\n MainMenuListWorkoutActionProps,\r\n MainMenuListWorkoutDataProps,\r\n} from './MainMenuListWorkout';\r\n\r\nexport interface MainMenuListWorkoutContainerProps {\r\n translate: TranslateFunction;\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n isDesktopMode: boolean;\r\n setWorkoutMenu: (val: boolean) => void;\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n showFoereningSwitcher: () => void;\r\n goToSchedule: () => void;\r\n onClick?: (val: boolean) => void;\r\n}\r\n\r\nconst mapStateToProps = (state: RootState, props: MainMenuListWorkoutContainerProps): MainMenuListWorkoutDataProps => {\r\n const foereningId = state.global.session.activeFoerening;\r\n let foerening: fos.api.InloggadeFoerening | undefined;\r\n if (foereningId) {\r\n foerening = state.global.session.inloggadeFoereningar.find(x => x.Id.toString() === foereningId.toString());\r\n }\r\n let externUrl = 'https://www.friskissvettis.se/';\r\n let onlineTrainingUrl: string | undefined = undefined;\r\n if (!!foerening && !!foerening.ExtraFoereningInfo) {\r\n externUrl = foerening.ExtraFoereningInfo.ExternalUrl;\r\n onlineTrainingUrl = foerening.ExtraFoereningInfo.OnlineTrainingUrl;\r\n }\r\n return {\r\n translate: props.translate,\r\n currentFoerening: props.currentFoerening,\r\n availableFoereningar: props.availableFoereningar,\r\n isDesktopMode: props.isDesktopMode,\r\n setWorkoutMenu: props.setWorkoutMenu,\r\n getFoereningUrl: externUrl,\r\n onlineTrainingUrl: onlineTrainingUrl,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch, props: MainMenuListWorkoutContainerProps): MainMenuListWorkoutActionProps => ({\r\n openSidebarSchedule: props.openSidebarSchedule,\r\n showSidebar: props.showSidebar,\r\n showFoereningSwitcher: props.showFoereningSwitcher,\r\n goToSchedule: props.goToSchedule,\r\n onClick: props.onClick,\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(MainMenuListWorkout);\r\n","import * as React from 'react';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { MainMenuActiveItem } from 'store/global/ui/main-menu';\r\nimport { MainMenuListAccount } from './MainMenuListAccount';\r\nimport MainMenuListWorkoutContainer from './MainMenuListWorkoutContainer';\r\n\r\nexport interface MainMenuListSwitcherActionProps {\r\n openSidebarSchedule: () => void;\r\n showSidebar: () => void;\r\n showFoereningSwitcher: () => void;\r\n goToSchedule: () => void;\r\n onClick?: (val: boolean) => void;\r\n logout: () => void;\r\n}\r\n\r\nexport interface MainMenuListSwitcherDataProps {\r\n activeMenu: MainMenuActiveItem;\r\n show: boolean;\r\n translate: TranslateFunction;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n newNotificationsCount?: number;\r\n isDesktopMode: boolean;\r\n accountMenu?: boolean;\r\n workoutMenu?: boolean;\r\n setAccountMenu: (val: boolean) => void;\r\n setWorkoutMenu: (val: boolean) => void;\r\n}\r\n\r\nexport type MainMenuListSwitcherProps = MainMenuListSwitcherActionProps & MainMenuListSwitcherDataProps;\r\n\r\nexport class MainMenuListSwitcher extends React.Component {\r\n renderActiveMenuList(menuToShow: MainMenuActiveItem) {\r\n if (menuToShow === MainMenuActiveItem.MY_ACCOUNT) {\r\n return (\r\n \r\n );\r\n } else if (menuToShow === MainMenuActiveItem.MY_WORKOUT) {\r\n return (\r\n \r\n );\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n getClasses(): string {\r\n const baseClass: string = 'MainMenuListSwitcher';\r\n if (this.props.show) {\r\n return baseClass + ' ' + this.getShowingClass();\r\n } else {\r\n return baseClass + ' ' + this.getShowingClass();\r\n }\r\n }\r\n\r\n getShowingClass(): string {\r\n let direction = this.props.activeMenu === MainMenuActiveItem.MY_WORKOUT ? '__Right' : '__Left';\r\n // TODO - replace when online training link is available\r\n let activeOnlineTraining = true ? 'Extended' : '';\r\n if (this.props.show) {\r\n return `showing${direction} ${activeOnlineTraining}`;\r\n } else {\r\n return 'hiding';\r\n }\r\n }\r\n\r\n render() {\r\n if (this.props.show) {\r\n return
    {this.renderActiveMenuList(this.props.activeMenu)}
    ;\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { IconMyAccount, IconMyWorkout, IconMenuArrow } from '../icons/index';\r\nimport { MainMenuListSwitcher } from './main-menu-list/MainMenuListSwitcher';\r\nimport { MainMenuActiveItem } from 'store/global/ui/main-menu';\r\nimport { OutsideClickHandler } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface MainMenuActionProps {\r\n setActiveMenu: (menu: MainMenuActiveItem) => void;\r\n closeMenu: () => void;\r\n setSidebarToContainSchedule: () => void;\r\n setSidebarToVisible: () => void;\r\n showFoereningSwitcher: () => void;\r\n setIosDeviceId: (deviceId: string) => void;\r\n setAndroidDeviceId: (deviceId: string) => void;\r\n goToSchedule: () => void;\r\n updatePasslist: (foereningId: number) => void;\r\n logout: () => void;\r\n}\r\n\r\nexport interface MainMenuDataProps {\r\n activeMenu: MainMenuActiveItem;\r\n translate: TranslateFunction;\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n newNotificationsCount?: number;\r\n isDesktopMode: boolean;\r\n authenticated: boolean;\r\n}\r\n\r\nexport interface MainMenuState {\r\n accountMenu?: boolean;\r\n workoutMenu?: boolean;\r\n}\r\n\r\nexport type FooterContentProps = MainMenuActionProps & MainMenuDataProps;\r\n\r\nexport class MainMenu extends React.Component {\r\n node: HTMLDivElement | null = null;\r\n constructor(props: FooterContentProps) {\r\n super(props);\r\n this.state = {\r\n accountMenu: false,\r\n workoutMenu: false,\r\n };\r\n this.handleOutsideClick = this.handleOutsideClick.bind(this);\r\n this.setAccountMenu = this.setAccountMenu.bind(this);\r\n this.setWorkoutMenu = this.setWorkoutMenu.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('iosPushNotification', this.iosPushNotification);\r\n window.addEventListener('androidPushNotification', this.androidPushNotification);\r\n window.addEventListener('androidCalendars', this.androidCalendars);\r\n window.addEventListener('iosCalendars', this.iosCalendars);\r\n window.addEventListener('mobileFocus', this.onFocus);\r\n }\r\n\r\n iosPushNotification = (data: any) => {\r\n this.props.setIosDeviceId(data.detail);\r\n };\r\n\r\n androidPushNotification = (data: any) => {\r\n this.props.setAndroidDeviceId(data.detail);\r\n };\r\n\r\n androidCalendars = (data: any) => {\r\n // tslint:disable-next-line: max-line-length\r\n };\r\n\r\n iosCalendars = (data: any) => {\r\n // tslint:disable-next-line: no-console\r\n // console.log(data.detail);\r\n };\r\n\r\n onFocus = () => {\r\n if (this.props.currentFoerening) {\r\n this.props.updatePasslist(parseInt(this.props.currentFoerening.Id + '', 10));\r\n }\r\n\r\n if (this.props.authenticated) {\r\n const intent = localStorage.getItem('intent');\r\n if (intent === 'schedule') {\r\n this.props.goToSchedule();\r\n localStorage.removeItem('intent');\r\n }\r\n }\r\n };\r\n\r\n getIsActive(menu: MainMenuActiveItem): boolean {\r\n return menu === this.props.activeMenu;\r\n }\r\n\r\n getActiveStyles(menu: MainMenuActiveItem): boolean {\r\n return menu === this.props.activeMenu;\r\n }\r\n\r\n renderMainMenuContainer(menuShowing: MainMenuActiveItem) {\r\n const menuShouldBeShown = menuShowing && menuShowing !== MainMenuActiveItem.NONE;\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n handleOutsideClick() {\r\n this.props.closeMenu();\r\n OutsideClickHandler.delete(this.handleOutsideClick);\r\n }\r\n\r\n setAccountMenu(val: boolean) {\r\n this.setState({\r\n accountMenu: val,\r\n workoutMenu: false,\r\n });\r\n }\r\n\r\n setWorkoutMenu(val: boolean) {\r\n this.setState({\r\n workoutMenu: val,\r\n accountMenu: false,\r\n });\r\n }\r\n\r\n openMenu(menu: MainMenuActiveItem) {\r\n OutsideClickHandler.delete(this.handleOutsideClick);\r\n if (menu !== this.props.activeMenu) {\r\n this.props.setActiveMenu(menu);\r\n OutsideClickHandler.register(this.handleOutsideClick);\r\n } else {\r\n this.props.closeMenu();\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n this.node = node;\r\n }}\r\n >\r\n {this.renderMainMenuContainer(this.props.activeMenu)}\r\n
    \r\n {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this.openMenu(MainMenuActiveItem.MY_ACCOUNT);\r\n }}\r\n >\r\n \r\n\r\n \r\n {' '}\r\n Jag{' '}\r\n
    \r\n {this.getIsActive(MainMenuActiveItem.MY_ACCOUNT) && (\r\n
    \r\n \r\n
    \r\n )}\r\n {this.myAccountHasNewEvents() &&
    }\r\n
    \r\n \r\n
    \r\n {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this.openMenu(MainMenuActiveItem.MY_WORKOUT);\r\n }}\r\n >\r\n \r\n\r\n \r\n {' '}\r\n Friskis{' '}\r\n
    \r\n\r\n {this.getIsActive(MainMenuActiveItem.MY_WORKOUT) && (\r\n
    \r\n \r\n
    \r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private myAccountHasNewEvents() {\r\n return !!this.props.newNotificationsCount && this.props.newNotificationsCount > 0;\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { MainMenuActionProps, MainMenuDataProps, MainMenu } from './MainMenu';\r\nimport { setActiveMenu, closeMenu } from 'store/global/ui/main-menu';\r\n\r\nimport { SidebarStatus, SidebarContentType } from '../../store/global/ui/side-bar/sideBarReducer';\r\n\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { toogleFoereningSwitcher } from 'store/global/ui/foereningSwitcher';\r\nimport { getApplicationViewModeIsDesktop } from 'store/global/ui/application-mode';\r\nimport { goToSchedule } from 'store/location';\r\nimport { registerDeviceId } from 'store/global/pushNotifications/registerDeviceCmd/registerDeviceCmdThunks';\r\nimport { MobileOSType, isApp } from 'models/app/MobileOSType';\r\nimport { fetchPassListInBackground } from 'store/pass';\r\nimport { logout } from 'store/auth';\r\n\r\nconst mapStateToProps = (state: RootState): MainMenuDataProps => ({\r\n activeMenu: state.global.ui.bottomMenu.menuShowing,\r\n translate: getTranslate(state.locale),\r\n availableFoereningar: state.global.session.inloggadeFoereningar,\r\n currentFoerening: state.global.session.inloggadeFoereningar.find(\r\n f => f.Id.toString() === (state.global.session.activeFoerening as number).toString()\r\n ) as fos.api.InloggadeFoerening,\r\n newNotificationsCount: state.global.ui.newNotification.newNotificationsCount,\r\n isDesktopMode: getApplicationViewModeIsDesktop(state),\r\n authenticated: state.auth.read.isAuthenticated || false,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): MainMenuActionProps => ({\r\n setActiveMenu: menu => dispatch(setActiveMenu(menu)),\r\n closeMenu: () => dispatch(closeMenu()),\r\n setSidebarToContainSchedule: () =>\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_CONTENT_TYPE',\r\n contentType: SidebarContentType.SCHEDULE,\r\n }),\r\n setSidebarToVisible: () =>\r\n dispatch({\r\n type: 'UI_SIDEBAR_LAUNCH',\r\n visibility: SidebarStatus.SHOWING,\r\n }),\r\n setIosDeviceId: deviceId => dispatch(registerDeviceId(deviceId, MobileOSType.iOS)),\r\n setAndroidDeviceId: deviceId => dispatch(registerDeviceId(deviceId, MobileOSType.Android)),\r\n showFoereningSwitcher: () => dispatch(toogleFoereningSwitcher(true)),\r\n goToSchedule: () => dispatch(goToSchedule()),\r\n updatePasslist: (foereningId: number) => dispatch(fetchPassListInBackground(foereningId)),\r\n logout: () => {\r\n const app = isApp();\r\n dispatch(logout(app, !app));\r\n },\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(MainMenu);\r\n","import * as React from 'react';\r\n\r\ninterface HeaderTitleProps {\r\n title?: string;\r\n subtitle?: string;\r\n}\r\n\r\nexport const HeaderTitle: React.SFC = props => (\r\n
    \r\n {props.title && props.title.trim() !== '' &&

    {props.title}

    }\r\n {props.subtitle && props.subtitle.trim() !== '' &&

    {props.subtitle}

    }\r\n
    \r\n);\r\n","import * as React from 'react';\r\nimport MainMenuContainer from 'components/main-menu/MainMenuContainer';\r\nimport { HeaderTitle } from './HeaderTitle';\r\nimport { LocationActionTypes } from 'store/location';\r\n\r\ninterface DesktopHeaderContentProps {\r\n isAuthenticated: boolean;\r\n isFirstVisit: boolean;\r\n location: LocationActionTypes;\r\n activeFoerening: number;\r\n showHeaderTitle: boolean;\r\n headerTitle?: string;\r\n headerSubtitle?: string;\r\n}\r\n\r\nexport const DesktopHeaderContent: React.SFC = props => (\r\n
    \r\n {props.isAuthenticated &&\r\n ((props.location !== LocationActionTypes.ShoppingBasket &&\r\n props.location !== LocationActionTypes.PublicShoppingBasket) ||\r\n !props.isFirstVisit) ? (\r\n \r\n ) : props.showHeaderTitle ? (\r\n
    0 ? 'active-foe' : 'no-active-foe'}>\r\n \r\n
    \r\n ) : (\r\n
    \r\n )}\r\n
    \r\n);\r\n","import * as React from 'react';\r\nimport { MainButton } from '../common';\r\nimport { Banner } from '../common';\r\nimport background from '../../static/assets/background-login.jpg';\r\nimport { FancyNavLink } from 'components/app/FancyNavLink';\r\nimport { IconBigClose } from 'components/icons';\r\nimport { SitecoreDictionary } from 'models';\r\n\r\nimport { routesMap, LocationActionTypes } from 'store/location';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface LoginPromptDataProps {\r\n translate: TranslateFunction;\r\n}\r\nexport interface LoginPromptActionProps {\r\n setSiteSwitcherToVisible: () => void;\r\n toggleLoginPromptOpen: () => void;\r\n}\r\n\r\nexport type LoginPromptProps = LoginPromptDataProps & LoginPromptActionProps;\r\n\r\nexport class LoginPrompt extends React.Component {\r\n close = (e: React.MouseEvent, cat: string) => {\r\n e.stopPropagation();\r\n this.props.toggleLoginPromptOpen();\r\n };\r\n\r\n onLoginClick = () => {\r\n this.props.setSiteSwitcherToVisible();\r\n };\r\n\r\n render() {\r\n return (\r\n
    \r\n
    this.close(e, '')}>\r\n \r\n
    \r\n \r\n

    {this.props.translate(SitecoreDictionary.Login.PromptTitle)}

    \r\n

    {this.props.translate(SitecoreDictionary.Login.PromptDescription)}

    \r\n\r\n
    \r\n {this.props.translate(SitecoreDictionary.Login.PromptSignUpDescription)}\r\n this.close(e, 'Medlemskap')}\r\n >\r\n {this.props.translate(SitecoreDictionary.Login.PromptSignUpButton)}\r\n \r\n
    \r\n\r\n {this.props.translate(SitecoreDictionary.Login.PromptLoginDescription)}\r\n this.onLoginClick()}\r\n />\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default LoginPrompt;\r\n","import * as React from 'react';\r\n\r\nimport brand from 'static/assets/friskis-logo--red.svg';\r\nimport calendar from 'static/assets/converted-to-components/icon-calender.svg';\r\nimport close from 'static/assets/converted-to-components/icon-big-close.svg';\r\n\r\nimport { HeaderIconEnum } from 'store/global/ui/header';\r\nimport { SideBarState } from 'store/global/ui/side-bar/sideBarReducer';\r\nimport ScheduleLauncher from 'components/common/ScheduleLauncher';\r\nimport { BackButton } from './BackButton';\r\nimport { FancyNavLink } from 'components/app';\r\nimport { routesMap, LocationActionTypes as RouteActionType, LocationState, siteHasHistory } from 'store/location';\r\nimport { MobileHeaderContent } from './MobileHeaderContent';\r\nimport { DesktopHeaderContent } from './DesktopHeaderContent';\r\nimport { ShoppingBasketButton } from 'components/common';\r\nimport { routesMap as RouteMap } from 'store/location/routesMap';\r\nimport { Overlay } from 'components/common';\r\nimport { LoginPrompt } from '../../login/LoginPrompt';\r\n\r\nimport { FilterCategoryType } from 'store/global/ui/shop-filter';\r\nimport { SitecoreDictionary } from 'models';\r\nimport filtericon from '../../../static/assets/Filter.svg';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface HeaderContentExternalProps {\r\n isDesktopMode: boolean;\r\n isStartPage: boolean;\r\n isFirstVisit: boolean;\r\n}\r\n\r\nexport interface HeaderContentInternalProps {\r\n title: string | null;\r\n rightIcon: HeaderIconEnum;\r\n leftIcon: HeaderIconEnum;\r\n visible: boolean;\r\n sideBarState: SideBarState;\r\n isSiteSwitcherShowingFullscreen: boolean;\r\n showBackButton: boolean;\r\n backButtonPosition?: 'right' | 'left';\r\n isAuthenticated: boolean;\r\n isAuthenticatedInShopFoerening: boolean;\r\n showHeaderTitle: boolean;\r\n headerTitle?: string;\r\n headerSubtitle?: string;\r\n numberOfProductsInBasket: number;\r\n productsInBasket?: Array;\r\n isIframe: boolean;\r\n location: LocationState;\r\n isPublicWebMode: boolean;\r\n activeFoerening: number;\r\n shopFoerening?: number;\r\n products: Array;\r\n readonly expanded: boolean;\r\n translate: TranslateFunction;\r\n numbersOfFilters: number;\r\n}\r\n\r\nexport interface HeaderContentActionProps {\r\n showStatusMessage: (showMessage: boolean) => void;\r\n setSelectedCategory: (categoryName: FilterCategoryType) => void;\r\n goBack: () => void;\r\n goToLogin: () => void;\r\n setSiteSwitcherToVisible: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n setSiteSwitcherToVisibleFullscreen: () => void;\r\n clickHandler?: () => void;\r\n setSidebarToContainSchedule: () => void;\r\n setSidebarToVisible: () => void;\r\n goToSchedule: () => void;\r\n goToHome: () => void;\r\n setFilterVisible: (visible: boolean) => void;\r\n}\r\n\r\nexport type HeaderContentDataProps = HeaderContentInternalProps & HeaderContentExternalProps;\r\nexport type HeaderContentProps = HeaderContentActionProps & HeaderContentDataProps;\r\n\r\nexport class HeaderContent extends React.Component {\r\n componentDidUpdate(prevProps: HeaderContentProps) {\r\n this.checkIdInBasket();\r\n }\r\n\r\n getIcon(icon: HeaderIconEnum): string {\r\n if (icon === HeaderIconEnum.CALENDAR) {\r\n return calendar;\r\n } else {\r\n return close;\r\n }\r\n }\r\n\r\n onScheduleIconClick() {\r\n if (this.props.isDesktopMode) {\r\n this.props.setSidebarToContainSchedule();\r\n this.props.setSidebarToVisible();\r\n } else {\r\n this.props.goToSchedule();\r\n }\r\n }\r\n\r\n setIconClass(icon: HeaderIconEnum): string {\r\n if (icon === HeaderIconEnum.CALENDAR) {\r\n return 'scheduleLauncher__logoImage--calendar';\r\n } else {\r\n return 'scheduleLauncher__logoImage--close';\r\n }\r\n }\r\n\r\n getContentForHeaderMiddle() {\r\n return this.props.isDesktopMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n }\r\n\r\n openFilterIcon = () => {\r\n var isSafari =\r\n navigator.vendor &&\r\n navigator.vendor.indexOf('Apple') > -1 &&\r\n navigator.userAgent &&\r\n navigator.userAgent.indexOf('CriOS') === -1 &&\r\n navigator.userAgent.indexOf('FxiOS') === -1;\r\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\r\n var iOS2 = !!navigator.platform.match(/iPhone|iPod|iPad/);\r\n const filterIco = document.getElementById('FilterIconHeader');\r\n if (iOS || iOS2 || isSafari) {\r\n if (filterIco !== null) {\r\n filterIco.setAttribute('style', 'display: block');\r\n }\r\n }\r\n };\r\n closeFilterIcon = () => {\r\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\r\n var iOS2 = !!navigator.platform.match(/iPhone|iPod|iPad/);\r\n var isSafari =\r\n navigator.vendor &&\r\n navigator.vendor.indexOf('Apple') > -1 &&\r\n navigator.userAgent &&\r\n navigator.userAgent.indexOf('CriOS') === -1 &&\r\n navigator.userAgent.indexOf('FxiOS') === -1;\r\n const filterIco = document.getElementById('FilterIconHeader');\r\n if (iOS || iOS2 || isSafari) {\r\n if (filterIco !== null) {\r\n filterIco.setAttribute('style', 'display: none');\r\n }\r\n }\r\n };\r\n // check product type in basket. if type 0 ('Medlemskap') exists, return true\r\n checkIdInBasket = () => {\r\n if (this.props.productsInBasket) {\r\n for (let i = 0; i < this.props.productsInBasket.length; i++) {\r\n if (this.props.productsInBasket[i].Types[0] === 0) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n getHeaderTitleContent = (\r\n locationIsProductPage: boolean,\r\n locationIsShoppingBasket: boolean,\r\n isAdmin: boolean,\r\n locationIsRegister: boolean\r\n ) => {\r\n const headerTitleCond: boolean =\r\n this.props.isDesktopMode &&\r\n !this.props.isStartPage &&\r\n !locationIsProductPage &&\r\n !!this.props.title &&\r\n this.props.title.trim() !== '';\r\n if (headerTitleCond) {\r\n return (\r\n
    \r\n

    {this.props.title}

    \r\n
    \r\n );\r\n } else if (locationIsProductPage) {\r\n const product = this.props.products.find(\r\n p =>\r\n '' + p.Id === '' + this.props.location.payload.productId &&\r\n '' + p.CustomerType.Id === '' + this.props.location.query.customerType\r\n );\r\n return (\r\n
    \r\n

    \r\n \r\n \r\n {this.props.translate(SitecoreDictionary.Shop.ShopName)}\r\n {' >'}\r\n \r\n \r\n {!!product ? product.NamnSitecore : ''}\r\n

    \r\n
    \r\n );\r\n } else if (locationIsShoppingBasket && this.props.isDesktopMode) {\r\n return (\r\n
    \r\n

    \r\n \r\n \r\n {this.props.translate(SitecoreDictionary.Cart.CartName)}\r\n {' >'}\r\n \r\n \r\n

    \r\n
    \r\n );\r\n } else if (locationIsRegister && this.props.isDesktopMode) {\r\n return (\r\n
    \r\n

    \r\n \r\n {this.props.translate(SitecoreDictionary.Shop.RegisterName)}\r\n \r\n

    \r\n
    \r\n );\r\n }\r\n return ;\r\n };\r\n\r\n getShoppingBasketLinkUrl = (isAdmin: boolean) => {\r\n if (this.props.location.type === RouteActionType.PublicShoppingBasket) {\r\n return RouteMap[RouteActionType.PublicShoppingBasket];\r\n } else if (this.props.numberOfProductsInBasket !== 0 && !this.props.isPublicWebMode) {\r\n return RouteMap[isAdmin ? RouteActionType.AdminShoppingBasket : RouteActionType.ShoppingBasket];\r\n } else if (this.props.numberOfProductsInBasket === 0 && this.props.isPublicWebMode) {\r\n // eslint-disable-next-line no-script-url\r\n return 'javascript:void(0)';\r\n } else if (this.props.numberOfProductsInBasket === 0 && !this.props.isPublicWebMode) {\r\n return RouteMap[isAdmin ? RouteActionType.AdminShop : RouteActionType.Shop];\r\n } else if (this.props.numberOfProductsInBasket !== 0 && this.props.isPublicWebMode) {\r\n return RouteMap[RouteActionType.PublicShoppingBasket];\r\n }\r\n // eslint-disable-next-line no-script-url\r\n return 'javascript:void(0)';\r\n };\r\n\r\n render() {\r\n const isAdmin =\r\n this.props.location.type === RouteActionType.AdminShop ||\r\n this.props.location.type === RouteActionType.AdminProductDetails ||\r\n this.props.location.type === RouteActionType.AdminShoppingBasket ||\r\n this.props.location.type === RouteActionType.AdminRegister;\r\n const locationIsProductPage =\r\n this.props.location.type === RouteActionType.ProductDetails ||\r\n this.props.location.type === RouteActionType.PublicProductDetails ||\r\n this.props.location.type === RouteActionType.AdminProductDetails;\r\n const locationIsShoppingBasket =\r\n this.props.location.type === RouteActionType.ShoppingBasket ||\r\n this.props.location.type === RouteActionType.PublicShoppingBasket ||\r\n this.props.location.type === RouteActionType.AdminShoppingBasket;\r\n const locationIsRegister =\r\n this.props.location.type === RouteActionType.PublicRegister ||\r\n this.props.location.type === RouteActionType.AdminRegister;\r\n if (this.props.visible) {\r\n const logoUrl = this.props.isPublicWebMode\r\n ? routesMap[RouteActionType.PublicShop]\r\n : locationIsShoppingBasket || locationIsProductPage || locationIsRegister\r\n ? isAdmin\r\n ? routesMap[RouteActionType.AdminShop]\r\n : routesMap[RouteActionType.Shop]\r\n : routesMap[RouteActionType.Home];\r\n return (\r\n
    \r\n
    \r\n
    \r\n {this.props.leftIcon === HeaderIconEnum.FRISKIS_LOGO && (\r\n
    \r\n \r\n \"Friskis\"\r\n \r\n
    \r\n )}\r\n {this.props.leftIcon === HeaderIconEnum.FILTER && (\r\n
    \r\n {/* */}\r\n this.props.setFilterVisible(true)}\r\n src={filtericon}\r\n id=\"FilterIconHeader\"\r\n alt=\"filtericon\"\r\n />\r\n {this.props.numbersOfFilters > 0 && (\r\n \r\n {this.props.numbersOfFilters}\r\n
    \r\n )}\r\n {/* */}\r\n
    \r\n )}\r\n {this.props.leftIcon === HeaderIconEnum.BACK && (\r\n {\r\n if (\r\n this.props.location.type === RouteActionType.PassDetails &&\r\n !siteHasHistory(this.props.location)\r\n ) {\r\n this.props.goToSchedule();\r\n } else {\r\n this.props.goBack();\r\n }\r\n }}\r\n icon=\"chevron\"\r\n />\r\n )}\r\n
    \r\n {this.getContentForHeaderMiddle()}\r\n {/* Vi använder för tillfället bara rightIcon BACK på passlistan i mobil, där ska krysset alltid gå tillbaka till hem. Se över vid omskrivning */}\r\n {this.props.rightIcon === HeaderIconEnum.BACK && }\r\n {(this.props.rightIcon === HeaderIconEnum.CALENDAR || this.props.rightIcon === HeaderIconEnum.CLOSE) && (\r\n
    this.openFilterIcon()} className=\"ScheduleLauncherContainer\">\r\n \r\n
    \r\n )}\r\n {this.props.rightIcon === HeaderIconEnum.SHOPPINGBASKET && (\r\n 0 ? '' : ' noprod')}\r\n to={this.getShoppingBasketLinkUrl(isAdmin)}\r\n >\r\n \r\n \r\n )}\r\n
    \r\n {this.getHeaderTitleContent(locationIsProductPage, locationIsShoppingBasket, isAdmin, locationIsRegister)}\r\n {this.props.isSiteSwitcherShowingFullscreen && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { showMembershipMessage } from 'store/basket';\r\nimport { Location, LocationState } from 'store/location/locationModels';\r\nimport { LocationActionTypes as RouteActionType } from 'store/location/locationActions';\r\nimport { SideBarAction } from 'store/global/ui/side-bar/sideBarActions';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { getIsPublicWebMode, goToHome } from 'store/location';\r\nimport { SideBarState, SidebarStatus, SidebarContentType } from 'store/global/ui/side-bar/sideBarReducer';\r\nimport {\r\n HeaderContent,\r\n HeaderContentDataProps,\r\n HeaderContentActionProps,\r\n HeaderContentExternalProps,\r\n} from './HeaderContent';\r\nimport {\r\n getLocation,\r\n getPageTitle,\r\n LocationActionTypes as LocationActionType,\r\n goBack,\r\n goToSchedule,\r\n goToLogin,\r\n siteHasHistory,\r\n hasHeaderTitle,\r\n hasHeaderSubtitle,\r\n getHeaderSubtitleForCurrentLocation,\r\n getIsIframeMode,\r\n} from 'store/location';\r\nimport { getApplicationViewModeIsDesktop } from 'store/global/ui/application-mode';\r\nimport { SiteSwitcherAction, SiteSwitcherStatus } from 'store/global/ui/siteswitcher';\r\nimport { setSelectedCategory } from 'store/global/ui/shop-filter/uiShopFilterReducer';\r\nimport { constructSafeName } from 'utils';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { passFilterVisaFilter } from 'store/passFilter';\r\nimport { getIsFetching, FetchStatusAggregateTypes, getIsFetchingInBackgound } from 'store/global/fetch';\r\n\r\nconst setSidebarToContainSchedule = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_SET_CONTENT_TYPE',\r\n contentType: SidebarContentType.SCHEDULE,\r\n });\r\n};\r\n\r\nconst setSidebarToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SIDEBAR_LAUNCH',\r\n visibility: SidebarStatus.SHOWING,\r\n });\r\n};\r\n\r\nconst setSiteSwitcherToVisible = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW',\r\n });\r\n};\r\nconst setSiteSwitcherToVisibleFullscreen = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_SHOW_FULLSCREEN',\r\n });\r\n};\r\nconst setSiteSwitcherToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_HIDE',\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: HeaderContentExternalProps): HeaderContentDataProps => {\r\n const location: Location = getLocation(state.location);\r\n const translate: TranslateFunction = getTranslate(state.locale);\r\n const sidebarState: SideBarState = state.global.ui.sideBar;\r\n const showBackButton: boolean = shouldShowBackButton(location);\r\n const isPublicWebMode = getIsPublicWebMode(state.location);\r\n const expanded = state.global.ui.scheduleFilter.expanded;\r\n\r\n let backButtonPosition: 'left' | 'right' | undefined = undefined;\r\n if (showBackButton) {\r\n backButtonPosition = getBackButtonPosition(location);\r\n }\r\n const queryFromURL = new URLSearchParams(location.search);\r\n const foereningFromURL = queryFromURL.get('foerening');\r\n const foereningFromQuery = !!foereningFromURL\r\n ? state.foereningar.read.Foereningar.find(\r\n o =>\r\n constructSafeName(o.Namn.toLowerCase()) ===\r\n constructSafeName(decodeURIComponent(foereningFromURL.toLowerCase()))\r\n )\r\n : undefined;\r\n const foereningId = !!foereningFromQuery\r\n ? parseInt('' + foereningFromQuery.Id, 10)\r\n : !!state.global.session.activeFoerening\r\n ? state.global.session.activeFoerening\r\n : -1;\r\n const products = state.product.filteredProducts;\r\n\r\n let title: string | null = null;\r\n if (location.type === RouteActionType.PublicProductDetails || location.type === RouteActionType.ProductDetails) {\r\n const product =\r\n location.payload && location.payload.productId\r\n ? products.find(p => '' + p.Id === '' + location.payload.productId)\r\n : undefined;\r\n if (product) {\r\n title = product.NamnSitecore;\r\n }\r\n } else if (location.type === RouteActionType.PassDetails && state.passDetails.read.pass) {\r\n const passId = state.location.payload.passId;\r\n const isFetching =\r\n getIsFetching(state.global.fetch, passId, FetchStatusAggregateTypes.PASS) ||\r\n getIsFetchingInBackgound(state.global.fetch, passId, FetchStatusAggregateTypes.PASS);\r\n if (!isFetching) {\r\n title = state.passDetails.read.pass.Rubrik\r\n ? state.passDetails.read.pass.Rubrik\r\n : state.passDetails.read.pass.PassNamn;\r\n }\r\n }\r\n if (!title) {\r\n title = getPageTitle(location, props.isDesktopMode, translate);\r\n }\r\n\r\n return {\r\n expanded: expanded,\r\n sideBarState: sidebarState,\r\n isSiteSwitcherShowingFullscreen: state.global.ui.siteSwitcher.visibility === SiteSwitcherStatus.SHOW_FULLSCREEN,\r\n isDesktopMode: props.isDesktopMode,\r\n activeFoerening: foereningId as number,\r\n title: title,\r\n leftIcon: props.isDesktopMode ? state.global.ui.header.leftDesktopIcon : state.global.ui.header.leftMobileIcon,\r\n rightIcon: props.isDesktopMode ? state.global.ui.header.rightDesktopIcon : state.global.ui.header.rightMobileIcon,\r\n visible: location.type !== RouteActionType.Login && location.type !== RouteActionType.Reset,\r\n showBackButton,\r\n backButtonPosition,\r\n isStartPage: props.isStartPage,\r\n isAuthenticated: !!state.auth.read.isAuthenticated,\r\n showHeaderTitle:\r\n (hasHeaderTitle(state.location) || hasHeaderSubtitle(state.location)) && !state.auth.read.isAuthenticated,\r\n headerSubtitle: getHeaderSubtitleForCurrentLocation(),\r\n numberOfProductsInBasket: state.shoppingBasket.products.length,\r\n productsInBasket: state.shoppingBasket.products,\r\n isIframe: getIsIframeMode(state.location, getApplicationViewModeIsDesktop(state)),\r\n location: state.location,\r\n isPublicWebMode: isPublicWebMode,\r\n products: products,\r\n translate,\r\n shopFoerening: state.global.session.shopFoerening,\r\n isAuthenticatedInShopFoerening:\r\n !!state.auth.read.isAuthenticated && state.global.session.activeFoerening === state.global.session.shopFoerening,\r\n isFirstVisit: props.isFirstVisit,\r\n numbersOfFilters:\r\n state.passFilter.flatFilter.LedareOrTraenare.length +\r\n state.passFilter.flatFilter.Tidpunkt.length +\r\n state.passFilter.flatFilter.Traeningspass.length +\r\n state.passFilter.flatFilter.Traeningsstaelle.length +\r\n state.passFilter.flatFilter.Veckodag.length,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: HeaderContentActionProps = {\r\n // onScheduleIconClick: onScheduleIconClick,\r\n setSidebarToContainSchedule: setSidebarToContainSchedule,\r\n setSidebarToVisible: setSidebarToVisible,\r\n setSiteSwitcherToVisible: setSiteSwitcherToVisible,\r\n setSiteSwitcherToHidden: setSiteSwitcherToHidden,\r\n setSiteSwitcherToVisibleFullscreen: setSiteSwitcherToVisibleFullscreen,\r\n goToLogin: goToLogin,\r\n goToSchedule: goToSchedule,\r\n goToHome: goToHome,\r\n goBack,\r\n setSelectedCategory: setSelectedCategory,\r\n showStatusMessage: showMembershipMessage,\r\n setFilterVisible: passFilterVisaFilter,\r\n};\r\n\r\nfunction shouldShowBackButton(location: Location): boolean {\r\n return (\r\n location.type === LocationActionType.ShoppingBasket ||\r\n location.type === LocationActionType.ProductDetails ||\r\n location.type === LocationActionType.Settings_Profile ||\r\n location.type === LocationActionType.Settings_PaymentSettings ||\r\n location.type === LocationActionType.Settings_TrainingPreferences ||\r\n location.type === LocationActionType.Settings_NotificationSettings ||\r\n location.type === LocationActionType.Settings_CalendarSyncSettings ||\r\n location.type === LocationActionType.Settings_UserAccount ||\r\n location.type === LocationActionType.Schedule ||\r\n location.type === LocationActionType.PublicProductDetails ||\r\n (location.type === LocationActionType.PassDetails && siteHasHistory(location as LocationState))\r\n );\r\n}\r\n\r\nfunction getBackButtonPosition(location: Location): 'right' | 'left' {\r\n switch (location.type) {\r\n case LocationActionType.Settings_Profile:\r\n case LocationActionType.Settings_PaymentSettings:\r\n case LocationActionType.Settings_UserAccount:\r\n case LocationActionType.Settings_TrainingPreferences:\r\n case LocationActionType.PassDetails:\r\n return 'left';\r\n case LocationActionType.Settings_NotificationSettings:\r\n return 'left';\r\n case LocationActionType.Settings_CalendarSyncSettings:\r\n return 'left';\r\n default:\r\n return 'right';\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(HeaderContent);\r\n","import * as React from 'react';\r\n\r\nimport HeaderContent from './HeaderContent';\r\n\r\nexport interface HeaderDataProps {\r\n showHeader?: boolean;\r\n isDesktopMode: boolean;\r\n isStartPage: boolean;\r\n isFirstVisit: boolean;\r\n}\r\n\r\nexport class Header extends React.Component {\r\n render() {\r\n if (this.props.showHeader) {\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { Header } from './';\r\nimport { getShowHeaderForLocation } from 'store/location';\r\nimport { HeaderDataProps } from './Header';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): HeaderDataProps => {\r\n const showHeader: boolean = getShowHeaderForLocation(state.location, props.isDesktopMode);\r\n return {\r\n showHeader: showHeader,\r\n isDesktopMode: props.isDesktopMode,\r\n isStartPage: props.isStartPage,\r\n isFirstVisit: props.isFirstVisit,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps)(Header);\r\n","import * as React from 'react';\r\n\r\nimport closeIcon from 'static/assets/converted-to-components/icon-big-close.svg';\r\nimport brand from '../../static/assets/friskis-logo--red.svg';\r\n\r\n// Content types\r\nimport { SidebarContentType } from 'store/global/ui/side-bar/sideBarReducer';\r\nimport ScheduleContainer from 'components/schedule/schedule/ScheduleContainer';\r\n\r\nexport interface SideBarDataProps {\r\n showCloser?: boolean;\r\n isShowing: boolean;\r\n isConfirmationSideBar?: boolean;\r\n contentType: SidebarContentType;\r\n isDesktopFullViewMode: boolean; // Ordinarily it is only in the sidebar in the desktop mode.\r\n // Only when the schedule is to cover the full-width do wee want this value to be true\r\n isDesktopMode: boolean;\r\n isAuthenticated: boolean;\r\n aktivFoerening?: number;\r\n userId: number;\r\n}\r\n\r\nexport interface SideBarActionProps {\r\n setFilterVisible: (visible: boolean) => void;\r\n closerHandler?: () => void;\r\n hideSideBar?: () => void;\r\n}\r\n\r\nexport type SideBarProps = SideBarDataProps & SideBarActionProps;\r\n\r\nexport class SideBar extends React.Component {\r\n baseClass = 'SideBar';\r\n\r\n SideBarClasses = () => {\r\n let classes = this.baseClass;\r\n if (this.props.isShowing) {\r\n classes = classes + ' isShowing';\r\n }\r\n if (this.props.isDesktopMode) {\r\n if (this.props.isDesktopFullViewMode) {\r\n classes = classes + ` ${this.baseClass}--isDesktopMaximisedMode`;\r\n } else {\r\n classes = classes + ` ${this.baseClass}--isDesktopMinimisedMode`;\r\n if (this.isSafari()) {\r\n classes = classes + ' safari-treatment';\r\n }\r\n }\r\n }\r\n\r\n if (this.props.isConfirmationSideBar) {\r\n classes = classes + ' isConfirmation';\r\n }\r\n\r\n return classes;\r\n };\r\n\r\n isSafari() {\r\n // Small fulknep to check if its safari\r\n return navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1;\r\n }\r\n\r\n closeHandler = () => {\r\n if (this.props.hideSideBar) {\r\n this.props.hideSideBar();\r\n }\r\n };\r\n\r\n renderContentType() {\r\n switch (this.props.contentType) {\r\n case SidebarContentType.SCHEDULE: {\r\n if (!this.props.isAuthenticated || !this.props.aktivFoerening) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n default: {\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n renderCloser() {\r\n if (this.props.showCloser && !this.props.isDesktopMode) {\r\n return (\r\n
    \r\n \"Stäng\"\r\n
    \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n // TODO: Pop-up:en borde sträcka sig över hela sidan!\r\n render() {\r\n return (\r\n
    \r\n
    \r\n {!this.props.isDesktopMode && (\r\n \r\n )}\r\n
    {this.renderContentType()}
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default SideBar;\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { SideBarDataProps, SideBarActionProps, SideBar } from './SideBar';\r\nimport { closeSideBar } from 'store/global/ui/side-bar';\r\nimport { passFilterVisaFilter } from 'store/passFilter';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): SideBarDataProps => {\r\n return {\r\n isShowing: props.isShowing,\r\n contentType: props.contentType,\r\n isDesktopFullViewMode: props.isDesktopFullViewMode,\r\n isDesktopMode: props.isDesktopMode,\r\n isAuthenticated: props.isAuthenticated,\r\n aktivFoerening: props.aktivFoerening || state.global.session.activeFoerening,\r\n userId: props.userId,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps: SideBarActionProps = {\r\n hideSideBar: closeSideBar,\r\n setFilterVisible: passFilterVisaFilter,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(SideBar);\r\n","import * as React from 'react';\r\nimport CalendarSyncContainer from 'components/settings/calendarSync';\r\nimport { Overlay } from 'components/common';\r\n\r\nimport { Mobile } from 'models/app/MobileOSType';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface CalendarSyncPopupDataProps {\r\n syncCalendar: boolean;\r\n passToBook?: fos.api.Pass;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface CalendarSyncPopupActionProps {\r\n popupShown: () => void;\r\n}\r\n\r\nexport interface CalendarSyncState {\r\n checked: boolean;\r\n selectedCalendar?: string;\r\n}\r\n\r\nexport type CalendarSyncProps = CalendarSyncPopupDataProps & CalendarSyncPopupActionProps;\r\n\r\nconst Container = (props: any) => (\r\n
    \r\n
    {props.children}
    \r\n
    \r\n);\r\n\r\nexport class CalendarSyncPopup extends React.Component {\r\n constructor(props: CalendarSyncProps) {\r\n super(props);\r\n this.state = {\r\n checked: this.props.syncCalendar,\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n this.close();\r\n }}\r\n title=\"Kalendersynk\"\r\n >\r\n \r\n

    Vill du synka dina passbokningar med din kalender?

    \r\n \r\n
    \r\n \r\n );\r\n }\r\n\r\n close() {\r\n const pass = this.props.passToBook;\r\n if (this.props.syncCalendar && !!pass) {\r\n var data = JSON.stringify(pass);\r\n Mobile.addToCalendar(data);\r\n }\r\n this.props.popupShown();\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { setPassToBook } from '../../store/global/session/sessionActions';\r\nimport { CalendarSyncPopupDataProps, CalendarSyncPopupActionProps, CalendarSyncPopup } from './CalendarSyncPopup';\r\nimport { setShouldShowCalendarSyncPopup } from 'store/global/calendar';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): CalendarSyncPopupDataProps => ({\r\n translate: getTranslate(state.locale),\r\n passToBook: state.global.session.passToBook,\r\n syncCalendar: state.global.calendar.syncIsActive,\r\n});\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): CalendarSyncPopupActionProps => ({\r\n popupShown: () => {\r\n dispatch(setPassToBook());\r\n dispatch(setShouldShowCalendarSyncPopup(false));\r\n },\r\n});\r\n\r\nexport default connect(mapStateToProps, mapActionsToProps)(CalendarSyncPopup);\r\n","import * as React from 'react';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { Spinner, MainButton } from 'components/common';\r\n\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface AcceptBookingRulesPopupDataProps {\r\n isLoading?: boolean;\r\n updateFailed?: boolean;\r\n foereningar: FoereningInternal[];\r\n focusedFoerening?: FoereningInternal;\r\n activeFoerning: number;\r\n isDesktopMode: boolean;\r\n translate: TranslateFunction;\r\n}\r\n\r\nexport interface AcceptBookingRulesPopupActionProps {\r\n updateBookingRuleForActiveFoerening: (userAccepted: boolean) => void;\r\n fetchReglerIfNotInStore: (id: number) => void;\r\n setFocusOnFoerening: (id: number) => void;\r\n}\r\n\r\nexport interface AcceptBookingRulesLocalProps {\r\n Id: number;\r\n}\r\n\r\ntype AcceptBookingRulesPopupProps = AcceptBookingRulesPopupDataProps & AcceptBookingRulesPopupActionProps;\r\n\r\nconst Container = (props: any) => (\r\n
    \r\n
    {props.children}
    \r\n
    \r\n);\r\n\r\nexport class AcceptBookingRulesPopup extends React.Component<\r\n AcceptBookingRulesPopupProps,\r\n AcceptBookingRulesLocalProps\r\n> {\r\n constructor(props: AcceptBookingRulesPopupProps) {\r\n super(props);\r\n this.toggle = this.toggle.bind(this);\r\n\r\n this.state = {\r\n Id: this.props.activeFoerning,\r\n };\r\n }\r\n\r\n toggle() {\r\n this.props.fetchReglerIfNotInStore(this.state.Id);\r\n }\r\n\r\n componentDidMount() {\r\n this.props.setFocusOnFoerening(this.props.activeFoerning);\r\n this.props.fetchReglerIfNotInStore(this.state.Id);\r\n }\r\n render() {\r\n if (this.props.isLoading) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return (\r\n \r\n
    \r\n {this.props.updateFailed ? (\r\n this.props.translate(SitecoreDictionary.AcceptBookingRulesPopup.FailedToUpdate)\r\n ) : (\r\n
    \r\n

    Bokningsregler

    \r\n {this.props.focusedFoerening && this.props.focusedFoerening.RuleText ? (\r\n \r\n ) : (\r\n
    \r\n )}\r\n
    \r\n )}\r\n
    \r\n
    \r\n this.props.updateBookingRuleForActiveFoerening(false)}\r\n title={this.props.translate(SitecoreDictionary.AcceptBookingRulesPopup.Cancel) as string}\r\n />\r\n this.props.updateBookingRuleForActiveFoerening(true)}\r\n title={\r\n (this.props.updateFailed\r\n ? this.props.translate(SitecoreDictionary.AcceptBookingRulesPopup.TryAgain)\r\n : this.props.translate(SitecoreDictionary.AcceptBookingRulesPopup.Accept)) as string\r\n }\r\n />\r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState, Dispatch } from 'store';\r\nimport {\r\n AcceptBookingRulesPopup,\r\n AcceptBookingRulesPopupDataProps,\r\n AcceptBookingRulesPopupActionProps,\r\n} from './AcceptBookingRulesPopup';\r\nimport { getTranslate } from 'store/global/dictionary';\r\nimport { updateBookingRuleForActiveFoereningAction } from 'store/user/updateBookingRuleForActiveFoereningCmd/updateBookingRuleForActiveFoereningThunks';\r\nimport { getIsExecuting, FetchCommandTypes, getIsExecutingFailed } from 'store/global/fetch';\r\nimport { setFocusOnFoerening } from 'store/global/ui/bookingRules';\r\nimport { fetchReglerIfNotInStore } from 'store/foereningar';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): AcceptBookingRulesPopupDataProps => ({\r\n translate: getTranslate(state.locale),\r\n isLoading: getIsExecuting(\r\n state.global.fetch,\r\n state.global.session.activeFoerening ? state.global.session.activeFoerening.toString() : '-1',\r\n FetchCommandTypes.ACCEPT_BOOKING_RULES\r\n ),\r\n updateFailed: getIsExecutingFailed(\r\n state.global.fetch,\r\n state.global.session.activeFoerening ? state.global.session.activeFoerening.toString() : '-1',\r\n FetchCommandTypes.ACCEPT_BOOKING_RULES\r\n ),\r\n foereningar: state.foereningar.read.Foereningar.filter(i =>\r\n state.global.session.inloggadeFoereningar.find(j => j.Id.toString() === i.Id.toString())\r\n ),\r\n activeFoerning: state.global.session.activeFoerening as number,\r\n isDesktopMode: props.isDesktopMode,\r\n focusedFoerening: state.foereningar.read.Foereningar.find(\r\n i => i.Id.toString() === state.global.ui.bookingRules.focusedFoereningId.toString()\r\n ),\r\n});\r\n\r\nconst mapActionsToProps = (dispatch: Dispatch): AcceptBookingRulesPopupActionProps => ({\r\n updateBookingRuleForActiveFoerening: (accept: boolean) => dispatch(updateBookingRuleForActiveFoereningAction(accept)),\r\n fetchReglerIfNotInStore: (foerening: number) => dispatch(fetchReglerIfNotInStore(foerening)),\r\n setFocusOnFoerening: (id: number) => dispatch(setFocusOnFoerening(id)),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapActionsToProps)(AcceptBookingRulesPopup);\r\n","import { bokaPass } from 'store/pass';\r\nimport { ThunkAction } from 'store';\r\nimport { api } from 'api';\r\nimport { executingCommand, FetchCommandTypes, executedCommand, executingCommandFailed } from 'store/global/fetch';\r\nimport { setShouldAcceptBookingRulesAction, setPassToBook } from 'store/global/session';\r\nimport { BokningsStatusEnum } from 'models';\r\n\r\nexport const updateBookingRuleForActiveFoereningAction = (accept: boolean): ThunkAction => (dispatch, getState) => {\r\n const state = getState();\r\n if (!accept) {\r\n dispatch(setShouldAcceptBookingRulesAction(false));\r\n dispatch(setPassToBook());\r\n return;\r\n }\r\n\r\n if (!state.global.session.activeFoerening) {\r\n dispatch(executingCommandFailed('-1', FetchCommandTypes.ACCEPT_BOOKING_RULES));\r\n return;\r\n }\r\n\r\n const activeFoereningId: number = state.global.session.activeFoerening;\r\n dispatch(executingCommand(activeFoereningId.toString(), FetchCommandTypes.ACCEPT_BOOKING_RULES));\r\n\r\n return api.put(`Anvaendare/AcceptBookingRules?foereningId=${activeFoereningId}`, {}).then(res => {\r\n if (res.error) {\r\n dispatch(executingCommandFailed(activeFoereningId.toString(), FetchCommandTypes.ACCEPT_BOOKING_RULES));\r\n } else {\r\n // TODO: ouyo boka passet från kön\r\n dispatch(setShouldAcceptBookingRulesAction(false));\r\n dispatch(executedCommand(activeFoereningId.toString(), FetchCommandTypes.ACCEPT_BOOKING_RULES));\r\n const pass = state.global.session.passToBook;\r\n if (!!pass) {\r\n const bokaKoePlats =\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE ||\r\n pass.BokningStatus === BokningsStatusEnum.BOKNINGSBART_KOE_DROPIN;\r\n dispatch(bokaPass(pass, bokaKoePlats));\r\n }\r\n }\r\n });\r\n};\r\n","import * as React from 'react';\r\nimport { Overlay } from 'components/common';\r\nimport { IconArrow } from 'components/icons';\r\n\r\ninterface FoereningSwitcherDataProps {\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n foereningar: fos.api.InloggadeFoerening[];\r\n}\r\n\r\ninterface FoereningSwitcherActionProps {\r\n close: () => void;\r\n setActiveFoerening: (foerening: fos.api.InloggadeFoerening) => void;\r\n}\r\n\r\nexport type FoereningSwitcherProps = FoereningSwitcherDataProps & FoereningSwitcherActionProps;\r\n\r\nexport const FoereningSwitcher: React.SFC = props => {\r\n return (\r\n \r\n
    \r\n
      \r\n {props.foereningar.map(f => (\r\n (props.currentFoerening.Id !== f.Id ? props.setActiveFoerening(f) : null)}\r\n >\r\n {!!f.DisplayName ? f.DisplayName : f.Namn}\r\n {f.Id !== props.currentFoerening.Id && (\r\n
      \r\n \r\n
      \r\n )}\r\n \r\n ))}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { IconChevron } from '../icons';\r\nimport { FancyNavLink } from 'components/app';\r\n\r\nexport interface SiteSwitcherProps {\r\n readonly isDesktopMode: boolean;\r\n foereningUrl: string;\r\n foereningNamn: string;\r\n isPublicWebMode?: boolean;\r\n}\r\n\r\ninterface SiteSwitcherState {\r\n readonly halfExpanded: boolean;\r\n readonly fullExpanded: boolean;\r\n}\r\n\r\nexport class SiteSwitcher extends React.Component {\r\n constructor(props: SiteSwitcherProps) {\r\n super(props);\r\n this.getExpandedClass = this.getExpandedClass.bind(this);\r\n }\r\n\r\n UNSAFE_componentWillMount() {\r\n this.setExpandedState(false, false);\r\n }\r\n\r\n setExpandedState(halfState: boolean, fullState: boolean) {\r\n this.setState({\r\n halfExpanded: halfState,\r\n fullExpanded: fullState,\r\n });\r\n }\r\n\r\n halfExpand() {\r\n if (!this.state.halfExpanded && !this.state.fullExpanded) {\r\n this.setExpandedState(true, false);\r\n } else if (this.state.halfExpanded && !this.state.fullExpanded) {\r\n this.setExpandedState(false, false);\r\n } else if (!this.state.halfExpanded && this.state.fullExpanded) {\r\n this.setExpandedState(false, false);\r\n }\r\n }\r\n\r\n fullExpand() {\r\n if (this.state.halfExpanded && !this.state.fullExpanded) {\r\n this.setExpandedState(false, true);\r\n }\r\n\r\n setTimeout(() => window.open(this.props.foereningUrl, '_self'), 400);\r\n }\r\n\r\n getExpandedClass() {\r\n if (this.state.halfExpanded && !this.state.fullExpanded) {\r\n return 'SiteSwitcher SiteSwitcher--halfExpanded';\r\n }\r\n if (this.state.fullExpanded && !this.state.halfExpanded) {\r\n return 'SiteSwitcher SiteSwitcher--fullExpanded';\r\n }\r\n if (!this.state.fullExpanded && !this.state.halfExpanded) {\r\n return 'SiteSwitcher SiteSwitcher--Ejinloggad';\r\n }\r\n return 'SiteSwitcher';\r\n }\r\n\r\n getArrowDirection() {\r\n if (this.state.halfExpanded || this.state.fullExpanded) {\r\n return 'left';\r\n }\r\n return 'right';\r\n }\r\n render() {\r\n if (this.props.isDesktopMode) {\r\n return (\r\n
    \r\n this.fullExpand()}\r\n className={\r\n 'SiteSwitcher__Header' +\r\n (this.state.halfExpanded ? ' SiteSwitcher__Header--visible' : ' SiteSwitcher__Header--hidden')\r\n }\r\n >\r\n Gå till\r\n {'F&S ' + this.props.foereningNamn}\r\n
    \r\n
    this.halfExpand()}>\r\n \r\n
    \r\n
    \r\n );\r\n } else if (this.props.isPublicWebMode) {\r\n return (\r\n
    \r\n \r\n {'F&S ' + this.props.foereningNamn}\r\n \r\n
    \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from '../../store';\r\nimport { SiteSwitcherProps, SiteSwitcher } from './SiteSwitcher';\r\nimport { getIsPublicWebMode } from '../../store/location';\r\n\r\nconst mapStateToProps = (state: RootState, props: any): SiteSwitcherProps => {\r\n const foereningId = !!state.global.session.shopFoerening\r\n ? state.global.session.shopFoerening\r\n : state.global.session.activeFoerening;\r\n const foerening = state.foereningar.read.Foereningar.find(f => '' + f.Id === '' + foereningId);\r\n let url = 'https://www.friskissvettis.se/';\r\n if (!!foerening && !!foerening.ExtraFoereningInfo) {\r\n url = foerening.ExtraFoereningInfo.ExternalUrl;\r\n }\r\n return {\r\n isPublicWebMode: getIsPublicWebMode(state.location),\r\n isDesktopMode: props.isDesktopMode,\r\n foereningUrl: url,\r\n foereningNamn: !!foerening ? foerening.DisplayName : '',\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps)(SiteSwitcher);\r\n","import * as React from 'react';\r\nimport { IconChevron } from '../icons';\r\nimport Login from '../login/LoginContainer';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nexport interface SiteSwitcherLoginProps {\r\n readonly isDesktopMode: boolean;\r\n readonly isDesktopFullViewMode: boolean;\r\n isExecutingFailed: boolean;\r\n readonly isExecuting: boolean;\r\n foereningId: number;\r\n translate: TranslateFunction;\r\n languageId: number;\r\n username: string;\r\n password: string;\r\n isSiteSwitcherShowing: boolean;\r\n numberOfProductsInBasket?: number;\r\n}\r\n\r\nexport interface SiteSwitcherLoginPassedProps {\r\n publicScheduleMode?: boolean;\r\n passId?: number | string;\r\n bokaKoePlats?: boolean;\r\n title?: string;\r\n}\r\n\r\ninterface SiteSwitcherLoginState {\r\n readonly halfExpanded: boolean;\r\n outsideClick: boolean;\r\n}\r\n\r\nexport interface SiteSwitcherLoginActionProps {\r\n updateUsername: (email: string) => void;\r\n updatePassword: (password: string) => void;\r\n updateFoereningId: (foereningId: number) => void;\r\n onLogin: (credentials: fos.api.Credentials) => void;\r\n goToLogin: () => void;\r\n loginFromSchedule?: (credentials: fos.api.Credentials, passId: string | number, bokaKoePlats: boolean) => void;\r\n clearLoginCmd: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n}\r\n\r\ntype SiteSwitcherLoginAll = SiteSwitcherLoginProps & SiteSwitcherLoginActionProps & SiteSwitcherLoginPassedProps;\r\n\r\nexport class SiteSwitcherLogin extends React.Component {\r\n private node?: HTMLElement | null;\r\n constructor(props: SiteSwitcherLoginAll) {\r\n super(props);\r\n this.getExpandedClass = this.getExpandedClass.bind(this);\r\n this.handleClickOutside = this.handleClickOutside.bind(this);\r\n }\r\n componentDidMount() {\r\n document.addEventListener('mousedown', this.handleClickOutside, false);\r\n }\r\n UNSAFE_componentWillMount() {\r\n this.setExpandedState(false);\r\n this.isClickOutside(false);\r\n document.addEventListener('mousedown', this.handleClickOutside, false);\r\n }\r\n componentDidUpdate() {\r\n if (this.props.isSiteSwitcherShowing) {\r\n this.halfExpand();\r\n }\r\n }\r\n componentWillUnmount() {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false);\r\n }\r\n isClickOutside(outsideState: boolean) {\r\n this.setState({\r\n outsideClick: outsideState,\r\n });\r\n }\r\n handleClickOutside = (e: MouseEvent) => {\r\n if (this.node !== undefined && this.node !== null) {\r\n if (this.node.contains(e.target as Element)) {\r\n this.isClickOutside(false);\r\n } else {\r\n if ((e.target as Element).id === 'wrapper') {\r\n this.isClickOutside(true);\r\n this.setExpandedState(false);\r\n }\r\n }\r\n }\r\n };\r\n setExpandedState(halfState: boolean) {\r\n this.setState({\r\n halfExpanded: halfState,\r\n });\r\n }\r\n halfExpand() {\r\n if (!this.state.halfExpanded) {\r\n this.props.setSiteSwitcherToHidden();\r\n this.setExpandedState(true);\r\n } else {\r\n this.setExpandedState(false);\r\n }\r\n }\r\n getExpandedClass() {\r\n if (this.state.halfExpanded && this.state.outsideClick) {\r\n this.isClickOutside(false);\r\n return 'SiteSwitcher SiteSwitcher--Login';\r\n }\r\n if (this.state.halfExpanded || this.props.isSiteSwitcherShowing) {\r\n return 'SiteSwitcher SiteSwitcher--Login SiteSwitcher--halfExpanded';\r\n }\r\n return 'SiteSwitcher SiteSwitcher--Login';\r\n }\r\n getExpandedHeaderClass() {\r\n if (this.state.halfExpanded && this.state.outsideClick) {\r\n return 'SiteSwitcher__Header SiteSwitcher__Header--hidden';\r\n }\r\n if (this.state.halfExpanded || this.props.isSiteSwitcherShowing) {\r\n return 'SiteSwitcher__Header SiteSwitcher__Header--visible';\r\n }\r\n return 'SiteSwitcher__Header SiteSwitcher__Header--hidden';\r\n }\r\n getArrowDirection() {\r\n if (this.state.halfExpanded) {\r\n return 'right';\r\n }\r\n return 'left';\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n this.node = node;\r\n }}\r\n >\r\n
    \r\n \r\n
    \r\n\r\n
    this.halfExpand()}>\r\n \r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n// import moment from 'moment';\r\nimport 'moment/locale/sv';\r\n\r\nimport { ApiError } from 'store/global/errors';\r\n\r\nimport Bluescreen from './Bluescreen';\r\nimport Errors from './Errors';\r\nimport SwitchPage from './SwitchPage';\r\nimport HeaderContainer from 'components/header';\r\nimport ScheduleLauncher from 'components/common/ScheduleLauncher';\r\n\r\nimport FooterContentContainer from '../main-menu/MainMenuContainer';\r\nimport SideBarContainer from 'components/side-bar/SideBarContainer';\r\n\r\nimport CalendarSyncPopup from 'components/calendarSyncPopup';\r\nimport AcceptBookingRulesPopup from 'components/acceptBookingRulesPopup';\r\nimport { PopupGDPR } from 'components/shoppingBasket/forms/PopupGDPR';\r\n\r\nimport 'static/style/app.css';\r\nimport { SidebarContentType } from 'store/global/ui/side-bar/sideBarReducer';\r\nimport { LocationActionTypes as RouteActionType } from '../../store/location/locationActions';\r\nimport { LocationState, getIsAdminWebMode } from 'store/location';\r\n\r\nimport { FoereningSwitcher } from './FoereningSwitcher';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport { Overlay, Spinner } from 'components/common';\r\nimport { SitecoreDictionary } from 'models';\r\nimport { FoereningInternal } from 'store/foereningar/read';\r\nimport { getQueryStringValue, constructSafeName } from 'utils';\r\nimport SiteSwitcherContainer from 'components/SiteSwitcher/SiteSwitcherContainer';\r\nimport { HeaderIconEnum } from 'store/global/ui/header';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\nimport { SiteSwitcherLogin } from 'components/SiteSwitcher/SiteSwitcherLogin';\r\nimport moment from 'moment';\r\nimport { isApp, isAndroid, isIOS, isDebugAndroid, isDebugIos } from 'models/app/MobileOSType';\r\n\r\nexport interface AppDataProps {\r\n errors: ReadonlyArray;\r\n hasAppCrashed: boolean;\r\n className?: string;\r\n isPublicWebMode: boolean;\r\n location: LocationState;\r\n isIframe: boolean;\r\n showFoereningSwitcher: boolean;\r\n isSwitchingFoerening: boolean;\r\n header?: string;\r\n authenticated?: boolean;\r\n isSidebarShowing: boolean;\r\n isSiteSwitcherShowing: boolean;\r\n sidebarContentType: SidebarContentType | undefined | null;\r\n showHeader: boolean;\r\n showFooter: boolean;\r\n isDesktopMode: boolean;\r\n isSideBarMaximised: boolean;\r\n pageHasTitle: boolean;\r\n aktivFoerening: number | undefined;\r\n userId?: number;\r\n translate: TranslateFunction;\r\n currentFoerening: fos.api.InloggadeFoerening;\r\n availableFoereningar: fos.api.InloggadeFoerening[];\r\n languageCode: string;\r\n shouldAcceptBookingRules?: boolean;\r\n shouldShowCalendarSync?: boolean;\r\n allFoerenignar: FoereningInternal[];\r\n\r\n isExecuting: boolean;\r\n isExecutingFailed: boolean;\r\n languageId: number;\r\n foereningId: number;\r\n shopFoerening?: number;\r\n username: string;\r\n password: string;\r\n\r\n numberOfProductsInBasket?: number;\r\n isInitialized: boolean;\r\n passDetailsVisible: boolean;\r\n scheduleVisible: boolean;\r\n\r\n datumFoerModalVisas?: Date;\r\n datumFoerModalKanInteStaengas?: Date;\r\n schemaUrl?: string;\r\n}\r\n\r\nexport interface AppActionProps {\r\n initialize: (location: LocationState) => void;\r\n dismissError: (error: ApiError) => void;\r\n appCrashed: (error: Error) => void;\r\n setApplicationMode: () => void;\r\n toogleFoereningSwitcher: (isVisible: boolean) => void;\r\n updateActiveFoerening: (foerening: fos.api.InloggadeFoerening) => void;\r\n login: (credentials: fos.api.Credentials) => void;\r\n logout: (goToLogin: boolean, goToPublicWeb: boolean) => void;\r\n\r\n updateUsername: (email: string) => void;\r\n updatePassword: (password: string) => void;\r\n updateFoereningId: (foereningId: number) => void;\r\n onLogin: (credentials: fos.api.Credentials) => void;\r\n goToLogin: () => void;\r\n loginFromSchedule?: (credentials: fos.api.Credentials, passId: string | number, bokaKoePlats: boolean) => void;\r\n clearLoginCmd: () => void;\r\n setFoereningIdFromQueryParameter: () => void;\r\n setSiteSwitcherToHidden: () => void;\r\n setShopFoerening: (foereningId?: number) => void;\r\n setInitialized: (isInitialized: boolean) => void;\r\n getProfileInfo: (foereningId: number) => void;\r\n setHeaderIcons: (\r\n leftDesktopIcon?: HeaderIconEnum,\r\n rightDesktopIcon?: HeaderIconEnum,\r\n leftMobileIcon?: HeaderIconEnum,\r\n rightMobileIcon?: HeaderIconEnum\r\n ) => void;\r\n resetHeaderIcons: () => void;\r\n goToSchedule: () => void;\r\n}\r\n\r\nexport interface LoginPassedProps {\r\n publicScheduleMode?: boolean;\r\n passId?: number | string;\r\n bokaKoePlats?: boolean;\r\n title?: string;\r\n}\r\n\r\ninterface AppInternalState {\r\n canShowSchedule: boolean;\r\n isGdprVillkorOpened: boolean;\r\n isModalOpened: boolean;\r\n}\r\n\r\nconst initialState: AppInternalState = {\r\n canShowSchedule: false,\r\n isGdprVillkorOpened: true,\r\n isModalOpened: true,\r\n};\r\n\r\ntype AppProps = Readonly;\r\n\r\nexport class App extends React.Component {\r\n constructor(props: AppProps) {\r\n super(props);\r\n this.caughtError = this.caughtError.bind(this);\r\n this.state = initialState;\r\n this.toggleGdprVillkor = this.toggleGdprVillkor.bind(this);\r\n this.onResize = this.onResize.bind(this);\r\n this.props.initialize(this.props.location);\r\n }\r\n\r\n onResize() {\r\n const vh = window.innerHeight * 0.01;\r\n document.documentElement.style.setProperty('--vh', `${vh}px`);\r\n this.props.setApplicationMode();\r\n }\r\n\r\n doPageSpecificInit() {\r\n switch (this.props.location.type) {\r\n case RouteActionType.Shop:\r\n case RouteActionType.ShoppingBasket:\r\n case RouteActionType.ProductDetails:\r\n case RouteActionType.PublicShop:\r\n case RouteActionType.PublicShoppingBasket:\r\n case RouteActionType.PublicProductDetails:\r\n case RouteActionType.PublicRegister:\r\n case RouteActionType.AdminShop:\r\n case RouteActionType.AdminShoppingBasket:\r\n case RouteActionType.AdminProductDetails:\r\n case RouteActionType.AdminRegister: {\r\n const foereningFromQuery = getQueryStringValue('foerening');\r\n const shopFoereningFromLocalStorage = localStorage.getItem('SHOP_FOERENING');\r\n const inloggadFoereningFromLocalStorage = localStorage.getItem('INLOGGADE_FOERENING');\r\n if (!!foereningFromQuery) {\r\n const foerening = this.props.allFoerenignar.find(\r\n f =>\r\n constructSafeName(f.Namn).toLocaleLowerCase() ===\r\n constructSafeName(decodeURIComponent(foereningFromQuery)).toLocaleLowerCase()\r\n );\r\n if (!!foerening) {\r\n this.props.setShopFoerening(parseInt(foerening.Id.toString(), 10));\r\n localStorage.setItem('SHOP_FOERENING', foerening.Id.toString());\r\n }\r\n } else if (!!inloggadFoereningFromLocalStorage) {\r\n const inloggadeFoereningar: fos.api.InloggadeFoerening[] = JSON.parse(inloggadFoereningFromLocalStorage);\r\n if (!!inloggadeFoereningar && inloggadeFoereningar.length > 0) {\r\n const id = inloggadeFoereningar[0].Id.toString();\r\n this.props.setShopFoerening(parseInt(id, 10));\r\n localStorage.setItem('SHOP_FOERENING', id);\r\n }\r\n } else if (!!shopFoereningFromLocalStorage) {\r\n this.props.setShopFoerening(parseInt(shopFoereningFromLocalStorage, 10));\r\n localStorage.setItem('SHOP_FOERENING', shopFoereningFromLocalStorage);\r\n }\r\n if (!!this.props.aktivFoerening || !!this.props.currentFoerening) {\r\n this.props.getProfileInfo(\r\n !!this.props.aktivFoerening\r\n ? this.props.aktivFoerening\r\n : !!this.props.currentFoerening\r\n ? this.props.currentFoerening.Id\r\n : 0\r\n );\r\n }\r\n break;\r\n }\r\n default:\r\n this.props.setShopFoerening(undefined);\r\n localStorage.removeItem('SHOP_FOERENING');\r\n break;\r\n }\r\n this.props.setInitialized(true);\r\n }\r\n\r\n componentDidMount() {\r\n const scrollDiv = document.createElement('div');\r\n scrollDiv.className = 'scrollbar-measure';\r\n document.body.appendChild(scrollDiv);\r\n const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\r\n document.documentElement.style.setProperty('--scrollbarWidth', `${scrollbarWidth}px`);\r\n document.body.removeChild(scrollDiv);\r\n\r\n this.props.setInitialized(false);\r\n\r\n window.addEventListener('error', this.caughtError);\r\n window.addEventListener('unhandledrejection', this.caughtRejection);\r\n window.addEventListener('resize', this.onResize);\r\n this.onResize();\r\n\r\n setTimeout(\r\n () =>\r\n this.setState({\r\n ...this.state,\r\n canShowSchedule: true,\r\n }),\r\n 500\r\n );\r\n this.updateIcon();\r\n\r\n if (this.props.authenticated) {\r\n const intent = localStorage.getItem('intent');\r\n if (intent === 'schedule') {\r\n this.props.goToSchedule();\r\n localStorage.removeItem('intent');\r\n }\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('error', this.caughtError);\r\n window.removeEventListener('unhandledrejection', this.caughtRejection);\r\n window.removeEventListener('resize', this.onResize);\r\n }\r\n\r\n updateIcon() {\r\n switch (this.props.location.type) {\r\n case RouteActionType.Settings_Profile:\r\n case RouteActionType.Settings_PaymentSettings:\r\n case RouteActionType.Settings_TrainingPreferences:\r\n case RouteActionType.Settings_NotificationSettings:\r\n case RouteActionType.Settings_CalendarSyncSettings:\r\n case RouteActionType.Settings_UserAccount:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.BACK,\r\n HeaderIconEnum.NONE\r\n );\r\n break;\r\n case RouteActionType.PassDetails:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.BACK,\r\n HeaderIconEnum.NONE\r\n );\r\n break;\r\n case RouteActionType.PublicShoppingBasket:\r\n case RouteActionType.ShoppingBasket:\r\n case RouteActionType.PublicRegister:\r\n case RouteActionType.AdminShoppingBasket:\r\n case RouteActionType.AdminRegister:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.BACK,\r\n HeaderIconEnum.NONE\r\n );\r\n break;\r\n case RouteActionType.Schedule:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.FILTER,\r\n HeaderIconEnum.BACK\r\n );\r\n break;\r\n case RouteActionType.Shop:\r\n case RouteActionType.PublicShop:\r\n case RouteActionType.AdminShop:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.SHOPPINGBASKET,\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.SHOPPINGBASKET\r\n );\r\n break;\r\n case RouteActionType.ProductDetails:\r\n case RouteActionType.PublicProductDetails:\r\n case RouteActionType.AdminProductDetails:\r\n this.props.setHeaderIcons(\r\n HeaderIconEnum.INITIAL,\r\n HeaderIconEnum.SHOPPINGBASKET,\r\n HeaderIconEnum.BACK,\r\n HeaderIconEnum.SHOPPINGBASKET\r\n );\r\n break;\r\n case RouteActionType.PublicSchedule:\r\n this.props.setHeaderIcons(HeaderIconEnum.NONE, HeaderIconEnum.NONE, HeaderIconEnum.FILTER, HeaderIconEnum.NONE);\r\n break;\r\n default:\r\n this.props.resetHeaderIcons();\r\n break;\r\n }\r\n }\r\n\r\n componentDidUpdate(oldProps: AppProps) {\r\n if (this.props.isInitialized && (this.props.location.type !== oldProps.location.type || !oldProps.isInitialized)) {\r\n this.doPageSpecificInit();\r\n }\r\n if (oldProps.location.type !== this.props.location.type) {\r\n this.updateIcon();\r\n const mainContent = document.getElementById('mainContent');\r\n if (!!mainContent) {\r\n setTimeout(() => {\r\n if (!!mainContent.scrollTo) {\r\n mainContent.scrollTo(0, 0);\r\n } else {\r\n mainContent.scrollTop = 0;\r\n }\r\n if (!!window.scrollTo) {\r\n window.scrollTo(0, 0);\r\n } else {\r\n window.scroll(0, 0);\r\n }\r\n }, 0);\r\n }\r\n }\r\n\r\n if (oldProps.scheduleVisible !== this.props.scheduleVisible) {\r\n const body = document.querySelector('body');\r\n if (!body) {\r\n return;\r\n }\r\n if (this.props.scheduleVisible && !body.classList.contains('disableOverscrollY')) {\r\n body.classList.add('disableOverscrollY');\r\n } else if (!this.props.scheduleVisible && body.classList.contains('disableOverscrollY')) {\r\n body.classList.remove('disableOverscrollY');\r\n }\r\n }\r\n }\r\n\r\n componentDidCatch(error: Error & { __handled__?: boolean }, errorInfo: React.ErrorInfo) {\r\n if (!error.__handled__) {\r\n error.__handled__ = true;\r\n console.warn('componentDidCatch', error, errorInfo.componentStack);\r\n this.props.appCrashed(error);\r\n }\r\n }\r\n\r\n toggleGdprVillkor() {\r\n this.setState({\r\n ...this.state,\r\n isGdprVillkorOpened: !this.state.isGdprVillkorOpened,\r\n });\r\n }\r\n\r\n render() {\r\n const firstVisitLocalStorageItem = localStorage.getItem('firstvisit') || localStorage.getItem('firstVisit');\r\n const isFirstVisit = firstVisitLocalStorageItem == null || JSON.parse(firstVisitLocalStorageItem) === true;\r\n const {\r\n hasAppCrashed,\r\n errors,\r\n dismissError,\r\n isPublicWebMode,\r\n isSidebarShowing,\r\n sidebarContentType,\r\n showHeader,\r\n showFooter,\r\n isDesktopMode,\r\n isSideBarMaximised,\r\n aktivFoerening,\r\n userId,\r\n isIframe,\r\n } = this.props;\r\n\r\n const stillAuthenticating: boolean = this.props.authenticated === undefined;\r\n const isMobileMode = !isDesktopMode;\r\n // Used to hide the ScheduleLauncher\r\n // if errors exist so that it does not end up above the error messages on account of its high z-index value\r\n\r\n // const errorExists = errors && errors.length;\r\n const isLoginPage = this.props.location.type === RouteActionType.Login;\r\n const isShopPage =\r\n this.props.location.type === RouteActionType.Shop ||\r\n this.props.location.type === RouteActionType.PublicShop ||\r\n this.props.location.type === RouteActionType.AdminShop;\r\n const isProductPage =\r\n this.props.location.type === RouteActionType.ProductDetails ||\r\n this.props.location.type === RouteActionType.PublicProductDetails ||\r\n this.props.location.type === RouteActionType.AdminProductDetails;\r\n const isStartPage = this.props.location.type === RouteActionType.Home;\r\n const isShoppingBasketPage =\r\n this.props.location.type === RouteActionType.ShoppingBasket ||\r\n this.props.location.type === RouteActionType.PublicShoppingBasket ||\r\n this.props.location.type === RouteActionType.AdminShoppingBasket;\r\n const isPaymentPage = this.props.location.type === RouteActionType.Payment;\r\n const isReceiptPage = this.props.location.type === RouteActionType.Receipt;\r\n\r\n const isResetPasswordPage = this.props.location.type === RouteActionType.ResetPassword;\r\n // const isAuthenticatedOrIsInPublicWebMode = this.props.authenticated || isPublicWebMode;\r\n\r\n if (hasAppCrashed) {\r\n return ;\r\n }\r\n\r\n const modalKnappar =\r\n this.props.datumFoerModalKanInteStaengas &&\r\n moment(this.props.datumFoerModalKanInteStaengas).isBetween(moment('2000', 'YYYY'), moment.now())\r\n ? [\r\n {\r\n text: 'Logga ut',\r\n buttonType: 'primary',\r\n onClick: () => {\r\n this.props.logout(true, false);\r\n },\r\n },\r\n ]\r\n : [\r\n {\r\n text: 'Ok',\r\n buttonType: 'primary',\r\n onClick: () => {\r\n this.setState({ ...this.state, isModalOpened: false });\r\n },\r\n },\r\n ];\r\n const visaModal =\r\n !isLoginPage &&\r\n this.state.isModalOpened &&\r\n this.props.datumFoerModalVisas &&\r\n moment(this.props.datumFoerModalVisas).isBetween(moment('2000', 'YYYY'), moment.now());\r\n return (\r\n \r\n {this.state.isGdprVillkorOpened &&\r\n this.props.authenticated &&\r\n !isShoppingBasketPage &&\r\n !isShopPage &&\r\n !isProductPage &&\r\n !isPaymentPage &&\r\n !isReceiptPage &&\r\n !visaModal &&\r\n isFirstVisit && (\r\n this.props.logout(true, false),\r\n },\r\n {\r\n text: SitecoreDictionary.AcceptBookingRulesPopup.Accept,\r\n buttonType: 'primary',\r\n onClick: () => {\r\n localStorage.setItem('firstVisit', 'false');\r\n localStorage.removeItem('firstvisit');\r\n this.toggleGdprVillkor();\r\n },\r\n },\r\n ]}\r\n translate={this.props.translate}\r\n />\r\n )}\r\n {visaModal && (\r\n {\r\n this.setState({ ...this.state, isModalOpened: false });\r\n }\r\n }\r\n >\r\n
    \r\n
    \r\n
    \r\n {isApp() && (\r\n <>\r\n \r\n Hej! Nu byter vi app. Ladda ner den nya appen \"Mitt Friskis\" här:\r\n \r\n {(isAndroid() || isDebugAndroid()) && (\r\n \r\n Google play\r\n \r\n )}\r\n {(isIOS() || isDebugIos()) && (\r\n \r\n App store\r\n \r\n )}\r\n \r\n )}\r\n {!isApp() && (\r\n <>\r\n \r\n Hej! Nu byter vi bokningsplattform. Välkommen in till oss!\r\n \r\n \r\n Mitt Friskis\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n {modalKnappar.map((button, index) => {\r\n return (\r\n \r\n {index > 0 &&
    }\r\n
    \r\n \r\n {button.text}\r\n \r\n
    \r\n \r\n );\r\n })}\r\n
    \r\n
    \r\n
    \r\n \r\n )}\r\n {!isIframe && }\r\n {(isPublicWebMode || this.props.aktivFoerening !== this.props.shopFoerening) && (\r\n \r\n )}\r\n
    \r\n \r\n \r\n {(!isIframe || !isDesktopMode) && !stillAuthenticating && showHeader && (\r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n {(isPublicWebMode || isIframe || !stillAuthenticating) && (\r\n \r\n )}\r\n
    \r\n
    \r\n\r\n {!isIframe &&\r\n showFooter &&\r\n isMobileMode &&\r\n !stillAuthenticating &&\r\n this.props.authenticated &&\r\n !isLoginPage &&\r\n !isShopPage &&\r\n (!isShoppingBasketPage || !isFirstVisit) && (\r\n
    \r\n \r\n
    \r\n )}\r\n {!isIframe &&\r\n isDesktopMode &&\r\n !stillAuthenticating &&\r\n this.props.authenticated &&\r\n aktivFoerening &&\r\n userId &&\r\n !isLoginPage && (\r\n \r\n )}\r\n {\r\n \r\n \r\n \r\n }\r\n {this.props.isSwitchingFoerening && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n {this.props.showFoereningSwitcher && !this.props.isSwitchingFoerening && !!this.props.currentFoerening && (\r\n this.props.toogleFoereningSwitcher(false)}\r\n setActiveFoerening={f => this.props.updateActiveFoerening(f)}\r\n />\r\n )}\r\n {this.props.shouldShowCalendarSync && !visaModal && }\r\n {this.props.shouldAcceptBookingRules && !visaModal && }\r\n \r\n );\r\n }\r\n\r\n private caughtError(error: ErrorEvent & { __handled__?: boolean }) {\r\n if (!error.__handled__) {\r\n error.__handled__ = true;\r\n console.warn('caughtError', error.message, error);\r\n this.props.appCrashed(error.error);\r\n }\r\n }\r\n\r\n private caughtRejection(error: PromiseRejectionEvent & { __handled__?: boolean }) {\r\n if (!error.__handled__) {\r\n error.__handled__ = true;\r\n console.warn('caughtError', error.reason.message, error);\r\n this.props.appCrashed(error.reason);\r\n }\r\n }\r\n\r\n private getClassesforMainContent(): string {\r\n let classes = 'mainContent full-flex';\r\n if (!this.props.isDesktopMode) {\r\n classes += this.props.showFooter ? ' has-footer' : '';\r\n }\r\n if (this.props.passDetailsVisible) {\r\n classes += ' passdetail-visible';\r\n } else if (this.props.scheduleVisible) {\r\n classes += ' schedule-visible';\r\n }\r\n return classes;\r\n }\r\n\r\n private getClassesForHeader(isStartPage: boolean): string {\r\n const pgTitle = localStorage.getItem('pageTitle');\r\n let pageTitle;\r\n if (pgTitle !== null) {\r\n pageTitle = JSON.parse(pgTitle);\r\n }\r\n let headerClasses = 'header';\r\n if ((this.props.pageHasTitle || pageTitle) && !isStartPage) {\r\n headerClasses = headerClasses + ' hasPageTitle';\r\n }\r\n return headerClasses;\r\n }\r\n\r\n private getClassesForContainer(): string {\r\n let containerClasses = 'MainContainer ';\r\n if (this.props.isDesktopMode) {\r\n containerClasses = containerClasses + 'is-Desktop-Mode ';\r\n } else {\r\n containerClasses += this.props.showFooter ? ' has-footer ' : ' ';\r\n }\r\n if (\r\n this.props.location.type === RouteActionType.Shop ||\r\n this.props.location.type === RouteActionType.AdminShop ||\r\n this.props.isPublicWebMode\r\n ) {\r\n containerClasses = containerClasses + 'is__Shop ';\r\n }\r\n if (this.props.isSidebarShowing) {\r\n containerClasses = containerClasses + 'sideBar-Is-Showing ';\r\n\r\n if (this.props.isSideBarMaximised) {\r\n containerClasses = containerClasses + 'sideBar-Is-Maximised ';\r\n } else {\r\n containerClasses = containerClasses + 'sideBar-Is-Minimised ';\r\n }\r\n }\r\n\r\n return containerClasses;\r\n }\r\n}\r\n","import { ThunkAction } from 'store';\r\nimport { setInitialized } from '.';\r\n\r\nexport const initialized = (isInitialized: boolean): ThunkAction => dispatch => {\r\n dispatch(setInitialized(isInitialized));\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { RootState } from 'store';\r\nimport { setApplicationMode } from './Environment';\r\nimport { checkAuthStatus, logout, updateActiveFoerening } from 'store/auth';\r\nimport { getTranslate, getTranslationData, DictionaryStatus } from 'store/global/dictionary';\r\nimport { getApplicationViewModeIsDesktop } from 'store/global/ui/application-mode';\r\nimport { getAllErrors, getHasAppCrashed, removeError, sendErrorReport } from 'store/global/errors';\r\nimport {\r\n getIsPublicWebMode,\r\n getShowHeaderForLocation,\r\n getShowFooterForLocation,\r\n getIsIframeMode,\r\n getPageTitle,\r\n LocationActionTypes,\r\n switchView,\r\n LocationState,\r\n getIsAdminWebMode,\r\n goToSchedule,\r\n} from 'store/location';\r\nimport { SidebarStatus, showSideBarInFullDesktopWidth } from 'store/global/ui/side-bar';\r\nimport { SiteSwitcherStatus } from '../../store/global/ui/siteswitcher';\r\nimport { AppDataProps, AppActionProps, App } from './App';\r\nimport { Dispatch } from '../../store';\r\nimport { getImages } from 'store/global/ui/image';\r\nimport { getFoereningar } from 'store/foereningar';\r\nimport { toogleFoereningSwitcher } from 'store/global/ui/foereningSwitcher';\r\nimport {\r\n getIsExecutingFailed,\r\n FetchCommandTypes,\r\n getIsExecuting,\r\n getIsFetched,\r\n FetchStatusAggregateTypes,\r\n} from '../../store/global/fetch';\r\nimport { loginFromShop, loginWithCreds, loginFromSchedule } from '../../store/auth';\r\nimport {\r\n updateEmail,\r\n updateFoereningId,\r\n updatePassword,\r\n clearLoginCmd,\r\n setFoereningIdFromQueryParameter,\r\n} from '../../store/auth/loginCmd';\r\nimport { SiteSwitcherAction } from '../../store/global/ui/siteswitcher';\r\nimport { setShopFoerening } from 'store/global/session';\r\nimport { initialized } from '../../store/initialize';\r\nimport { getProfileInfo } from 'store/user';\r\nimport { HeaderIconEnum, setHeaderIcons, resetHeaderIcons } from 'store/global/ui/header';\r\nimport { TranslateFunction } from 'react-localize-redux';\r\n\r\nconst setSiteSwitcherToHidden = () => (dispatch: Dispatch) => {\r\n dispatch({\r\n type: 'UI_SITESWITCHER_HIDE',\r\n });\r\n};\r\n\r\nconst mapStateToProps = (state: RootState): AppDataProps => {\r\n const isDesktopMode = getApplicationViewModeIsDesktop(state);\r\n const translate: TranslateFunction = getTranslate(state.locale);\r\n const foereningId = state.global.session.activeFoerening;\r\n let foerening: fos.api.InloggadeFoerening | undefined;\r\n if (foereningId) {\r\n foerening = state.global.session.inloggadeFoereningar.find(x => x.Id.toString() === foereningId.toString());\r\n }\r\n return {\r\n isDesktopMode,\r\n errors: getAllErrors(state.global.errors),\r\n hasAppCrashed: getHasAppCrashed(state.global.errors),\r\n authenticated: state.auth.read.isAuthenticated,\r\n isPublicWebMode: getIsPublicWebMode(state.location),\r\n isSidebarShowing: state.global.ui.sideBar.visibility === SidebarStatus.SHOWING,\r\n isSiteSwitcherShowing: state.global.ui.siteSwitcher.visibility === SiteSwitcherStatus.SHOWING,\r\n sidebarContentType: state.global.ui.sideBar.contentType,\r\n showHeader: getShowHeaderForLocation(state.location, isDesktopMode),\r\n showFooter: getShowFooterForLocation(state.location, isDesktopMode),\r\n isIframe: getIsIframeMode(state.location, getApplicationViewModeIsDesktop(state)),\r\n isSideBarMaximised: showSideBarInFullDesktopWidth(state.global.ui.sideBar, state.global.ui.schedule),\r\n pageHasTitle: !!getPageTitle(state.location, isDesktopMode, translate),\r\n location: state.location,\r\n aktivFoerening: foereningId,\r\n userId: state.global.session.userId,\r\n foereningId: state.auth.loginCmd.foereningId,\r\n shopFoerening: state.global.session.shopFoerening,\r\n translate,\r\n isExecuting: getIsExecuting(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN),\r\n showFoereningSwitcher: state.global.ui.foereningSwitcher.isVisible,\r\n isSwitchingFoerening: state.global.ui.foereningSwitcher.isSwitchingFoerening,\r\n currentFoerening: state.global.session.inloggadeFoereningar.find(\r\n f => f.Id.toString() === (foereningId as number).toString()\r\n ) as fos.api.InloggadeFoerening,\r\n availableFoereningar: state.global.session.inloggadeFoereningar,\r\n languageCode: state.user.read.languageCode,\r\n shouldAcceptBookingRules: state.global.session.shouldAcceptBookingRules,\r\n shouldShowCalendarSync: false,\r\n isExecutingFailed: state.auth.loginCmd.email\r\n ? getIsExecutingFailed(state.global.fetch, state.auth.loginCmd.email, FetchCommandTypes.LOGIN)\r\n : false,\r\n languageId: state.global.ui.language.id,\r\n username: state.auth.loginCmd.email,\r\n password: state.auth.loginCmd.password,\r\n numberOfProductsInBasket: state.shoppingBasket.products.length,\r\n allFoerenignar: state.foereningar.read.Foereningar,\r\n isInitialized:\r\n state.global.dictionary.status === DictionaryStatus.READY &&\r\n getIsFetched(state.global.fetch, -1, FetchStatusAggregateTypes.GET_FOERENINGAR) &&\r\n getIsFetched(state.global.fetch, -1, FetchStatusAggregateTypes.GET_BILDER),\r\n passDetailsVisible: state.location.type === LocationActionTypes.PassDetails,\r\n scheduleVisible: state.location.type === LocationActionTypes.Schedule,\r\n\r\n datumFoerModalVisas: foerening && foerening.ExtraFoereningInfo && foerening.ExtraFoereningInfo.DatumFoerModalVisas,\r\n datumFoerModalKanInteStaengas:\r\n foerening && foerening.ExtraFoereningInfo && foerening.ExtraFoereningInfo.DatumFoerModalKanInteStaengas,\r\n schemaUrl: foerening && foerening.ExtraFoereningInfo && foerening.ExtraFoereningInfo.SchemaUrl,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch): AppActionProps => ({\r\n initialize: (location: LocationState) => {\r\n dispatch(getTranslationData());\r\n dispatch(setApplicationMode());\r\n dispatch(getFoereningar(getIsAdminWebMode(location)));\r\n dispatch(checkAuthStatus());\r\n dispatch(getImages());\r\n },\r\n dismissError: error => dispatch(removeError(error)),\r\n appCrashed: error => dispatch(sendErrorReport(error)),\r\n setApplicationMode: () => dispatch(setApplicationMode()),\r\n toogleFoereningSwitcher: isVisible => dispatch(toogleFoereningSwitcher(isVisible)),\r\n updateActiveFoerening: foerening => dispatch(updateActiveFoerening(foerening)),\r\n login: credentials => dispatch(loginFromShop(credentials)),\r\n logout: (goToLogin, goToPublicWeb) => dispatch(logout(goToLogin, goToPublicWeb)),\r\n onLogin: credentials => dispatch(loginWithCreds(credentials)),\r\n goToLogin: () => dispatch(switchView(LocationActionTypes.Home)),\r\n loginFromSchedule: (credentials, passId, bokaKoePlats) =>\r\n dispatch(loginFromSchedule(credentials, passId, bokaKoePlats)),\r\n updateUsername: username => dispatch(updateEmail(username)),\r\n updatePassword: password => dispatch(updatePassword(password)),\r\n updateFoereningId: foereningId => dispatch(updateFoereningId(foereningId)),\r\n clearLoginCmd: () => dispatch(clearLoginCmd()),\r\n setFoereningIdFromQueryParameter: () => dispatch(setFoereningIdFromQueryParameter()),\r\n setSiteSwitcherToHidden: () => dispatch(setSiteSwitcherToHidden()),\r\n setShopFoerening: (foereningId?: number) => dispatch(setShopFoerening(foereningId)),\r\n setInitialized: (isInitialized: boolean) => dispatch(initialized(isInitialized)),\r\n getProfileInfo: (activeFoerening: number) => dispatch(getProfileInfo(activeFoerening)),\r\n setHeaderIcons: (\r\n leftDesktopIcon?: HeaderIconEnum,\r\n rightDesktopIcon?: HeaderIconEnum,\r\n leftMobileIcon?: HeaderIconEnum,\r\n rightMobileIcon?: HeaderIconEnum\r\n ) => dispatch(setHeaderIcons(leftDesktopIcon, rightDesktopIcon, leftMobileIcon, rightMobileIcon)),\r\n resetHeaderIcons: () => dispatch(resetHeaderIcons()),\r\n goToSchedule: () => dispatch(goToSchedule()),\r\n});\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\r\n","import 'airbnb-js-shims';\r\nimport attachFastClick from 'fastclick';\r\nimport * as React from 'react';\r\nimport { render as renderDom } from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { hotjar } from './utils/hotjar';\r\nimport { configureStore } from './configureStore';\r\nimport App from './components/app';\r\n\r\nexport const store = configureStore();\r\n\r\nconst rootEl = document.getElementById('root');\r\nconst renderApp = (Component = App) => {\r\n renderDom(\r\n \r\n \r\n ,\r\n rootEl\r\n );\r\n};\r\n\r\ndocument.addEventListener('deviceready', () => {\r\n if ('addEventListener' in document) {\r\n document.addEventListener('DOMContentLoaded', () => attachFastClick(document.body), false);\r\n }\r\n});\r\nrenderApp();\r\n\r\nif (module.hot) {\r\n // If hot module replacement is enabled we rerender app on changes\r\n module.hot.accept('./components/app', () => {\r\n renderApp(require('./components/app').default);\r\n });\r\n\r\n // If hot module replacement is enabled we replace the root reducer\r\n module.hot.accept('./store', () => {\r\n store.replaceReducer(require('./store').rootReducer);\r\n });\r\n}\r\n\r\nhotjar();\r\n","import {\r\n PushNotificationSettingsActions,\r\n PushNotificationSettingsReducer,\r\n PushNotificationSettingsRootState,\r\n} from './pushNotificationSettings';\r\nimport { NewsReducer } from './news/newsReducer';\r\nimport { AnlaeggningAction as AnlaeggningUIAction } from './global/ui/anlaeggningar/anlaeggningarAction';\r\nimport { combineReducers, Reducer, Action as ReduxAction, AnyAction } from 'redux';\r\nimport { globalReducer, GlobalState, GlobalAction } from './global';\r\nimport { LocationState } from './location';\r\nimport { LocaleAction } from './global/dictionary';\r\nimport { InitializeRootState, initializeReducer } from './initialize/initializeReducer';\r\nimport { AnlaeggningarRootState, anlaeggningarReducer, AnlaeggningarAction } from './anlaeggningar';\r\nimport { InitializeAction } from './initialize/initializeActions';\r\nimport { passDetailsReducer, PassDetailsRootState, PassDetailsAction } from './pass-details';\r\nimport { passReducer, PassRootState, PassAction } from './pass';\r\nimport { UIAction } from './global/ui/uiActions';\r\nimport { userReducer, UserRootState, UserAction } from './user';\r\nimport { FoereningarRootState, FoereningarReducer } from './foereningar';\r\nimport { BasketRootState, BasketReducer, BasketActions } from './basket';\r\n\r\nimport { BokningarReducer, BokningarRootState, BokningarAction } from './bokningar';\r\nimport {\r\n TrainingPreferencesReducer,\r\n TrainingPreferencesRootState,\r\n TrainingPreferencesAction,\r\n} from './trainingpreferences';\r\nimport { MedlemskapOchKortReducer, MedlemskapOchKortRootState, MedlemskapOchKortActions } from './medlemskapOchKort';\r\nimport { AuthReducer, AuthRootState, AuthActions, AuthAction } from './auth';\r\nimport { PaymentActions, PaymentRootState, PaymentReducer } from './payment';\r\nimport { ShopAction, ShopRootState, ProductReducer } from './shop';\r\nimport { UIShopFilterAction } from 'store/global/ui/shop-filter/uiShopFilterActions';\r\nimport { StatisticsActions, StatisticsRootState, StatisticsReducers } from './statistics';\r\nimport { NotificationsActions, NotificationsRootState, NotificationsReducer } from './notifications';\r\nimport { NewsAction, NewsRootState } from './news';\r\nimport { calendarReducer, CalendarState } from './global/calendar';\r\nimport { HeaderAction } from './global/ui/header';\r\nimport { PassFilterAction, PassFilterRootState, passFilterReducer } from 'store/passFilter';\r\nimport { LocaleState } from 'react-localize-redux';\r\n// import { LocationState } from 'redux-first-router';\r\n\r\nexport type Action =\r\n | GlobalAction\r\n | LocaleAction\r\n | PassDetailsAction\r\n | PassAction\r\n | InitializeAction\r\n | UIAction\r\n | UserAction\r\n | BokningarAction\r\n | TrainingPreferencesAction\r\n | MedlemskapOchKortActions\r\n | AuthActions\r\n | BasketActions\r\n | PaymentActions\r\n | ShopAction\r\n | AnlaeggningUIAction\r\n | AnlaeggningarAction\r\n | UIShopFilterAction\r\n | StatisticsActions\r\n | NotificationsActions\r\n | NewsAction\r\n | PushNotificationSettingsActions\r\n | HeaderAction\r\n | PassFilterAction\r\n | AuthAction;\r\n\r\nexport interface Dispatch | ReadonlyArray> {\r\n (action: T): T;\r\n (asyncAction: ThunkAction): R;\r\n}\r\n\r\nexport type ThunkAction = (\r\n dispatch: Dispatch,\r\n getState: () => RootState\r\n) => // tslint:disable-next-line:no-any\r\nAnyAction | Action | ReduxAction | ReadonlyArray | ReadonlyArray | Promise | null | void;\r\n\r\nexport interface RootState {\r\n readonly global: GlobalState;\r\n readonly location: LocationState;\r\n readonly locale: LocaleState;\r\n readonly pass: PassRootState;\r\n readonly passDetails: PassDetailsRootState;\r\n readonly initialize: InitializeRootState;\r\n readonly user: UserRootState;\r\n readonly anlaeggningar: AnlaeggningarRootState;\r\n readonly foereningar: FoereningarRootState;\r\n readonly bokningar: BokningarRootState;\r\n readonly trainingPreferences: TrainingPreferencesRootState;\r\n readonly abonnemang: MedlemskapOchKortRootState;\r\n readonly auth: AuthRootState;\r\n readonly shoppingBasket: BasketRootState;\r\n readonly payment: PaymentRootState;\r\n readonly product: ShopRootState;\r\n readonly statistics: StatisticsRootState;\r\n readonly notifications: NotificationsRootState;\r\n readonly news: NewsRootState;\r\n readonly pushNotificationSettings: PushNotificationSettingsRootState;\r\n readonly calendar: CalendarState;\r\n readonly passFilter: PassFilterRootState;\r\n}\r\n\r\nexport const rootReducer = (locationReducer: Reducer, localeReducer: Reducer) =>\r\n combineReducers({\r\n global: globalReducer,\r\n location: locationReducer,\r\n locale: localeReducer,\r\n pass: passReducer,\r\n passDetails: passDetailsReducer,\r\n initialize: initializeReducer,\r\n anlaeggningar: anlaeggningarReducer,\r\n foereningar: FoereningarReducer,\r\n user: userReducer,\r\n bokningar: BokningarReducer,\r\n trainingPreferences: TrainingPreferencesReducer,\r\n abonnemang: MedlemskapOchKortReducer,\r\n auth: AuthReducer,\r\n shoppingBasket: BasketReducer,\r\n payment: PaymentReducer,\r\n product: ProductReducer,\r\n statistics: StatisticsReducers,\r\n notifications: NotificationsReducer,\r\n news: NewsReducer,\r\n pushNotificationSettings: PushNotificationSettingsReducer,\r\n calendar: calendarReducer,\r\n passFilter: passFilterReducer,\r\n });\r\n","module.exports = __webpack_public_path__ + \"static/media/friskis-logo--red.8a9390b6.svg\";","module.exports = __webpack_public_path__ + \"static/media/icon-big-close.9807b3cd.svg\";","module.exports = __webpack_public_path__ + \"static/media/Filter.44ad8fa5.svg\";"],"sourceRoot":""}