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 | 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x | import { createSelector } from '@ngrx/store'; import { v4 as uuid } from 'uuid'; import { Customer } from 'ish-core/models/customer/customer.model'; import { User } from 'ish-core/models/user/user.model'; import { getLoggedInCustomer, getLoggedInUser } from 'ish-core/store/customer/user'; import { getSelectedProduct } from 'ish-core/store/shopping/products'; import { getTactonState } from '../tacton-store'; export const getTactonConfig = createSelector(getTactonState, state => state?.tactonConfig); export const getSelfServiceApiConfiguration = createSelector(getTactonConfig, config => config?.selfService); export const getNewExternalId = createSelector( getLoggedInCustomer, getLoggedInUser, (customer: Customer, user: User) => customer && user && `${customer.companyName}(${user.login}) - ${uuid()}` ); const productMappings = createSelector(getTactonConfig, state => state?.productMappings || {}); export const getTactonProductForSelectedProduct = createSelector( productMappings, getSelectedProduct, (mappings, product) => mappings[product?.sku] ); |