Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 417x 417x 417x 417x 417x 417x 12x 417x 417x 417x 417x 417x 417x 417x 417x 417x 417x 417x 9x 9x 417x | import { createSelector } from '@ngrx/store'; import { PriceType } from 'ish-core/models/price/price.model'; import { getServerConfigParameter } from 'ish-core/store/core/server-config'; import { getCustomerState } from 'ish-core/store/customer/customer-store'; const getUserState = createSelector(getCustomerState, state => state.user); export const getLoggedInCustomer = createSelector(getUserState, state => state.customer); export const isBusinessCustomer = createSelector( getLoggedInCustomer, customer => !!customer && customer.isBusinessCustomer ); export const getLoggedInUser = createSelector(getUserState, state => state.user); export const getUserAuthorized = createSelector(getUserState, state => state.authorized); export const getUserCostCenters = createSelector(getUserState, state => state.costCenters); export const getUserPaymentMethods = createSelector(getUserState, state => state.paymentMethods); export const getUserLoading = createSelector(getUserState, state => state.loading); export const getUserError = createSelector(getUserState, state => state.error); export const getPGID = createSelector(getUserState, state => state.pgid); export const getPasswordReminderSuccess = createSelector(getUserState, state => state.passwordReminderSuccess); export const getPasswordReminderError = createSelector(getUserState, state => state.passwordReminderError); export const getCustomerApprovalEmail = createSelector(getUserState, state => state.customerApprovalEmail); export const getPriceDisplayType = createSelector( getUserAuthorized, isBusinessCustomer, getServerConfigParameter<'PRIVATE' | 'SMB'>('pricing.defaultCustomerTypeForPriceDisplay'), getServerConfigParameter<PriceType>('pricing.privateCustomerPriceDisplayType'), getServerConfigParameter<PriceType>('pricing.smbCustomerPriceDisplayType'), (loggedIn, businessCustomer, defaultCustomer, b2c, b2b): PriceType => { const isB2B = (!loggedIn && defaultCustomer === 'SMB') || businessCustomer; return isB2B ? b2b || 'net' : b2c || 'gross'; } ); export const getNewsletterSubscriptionStatus = createSelector(getUserState, state => state.subscribedToNewsletter); |