project: move normalizeOptions to @/utils/entity
This commit is contained in:
parent
20211630e5
commit
3006e6d585
@ -1,9 +1,9 @@
|
||||
import type { ProcessContext } from '../types';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -2,11 +2,11 @@ import { radioCalcType, radioGraphType, selectSeasonType } from '@/config/defaul
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import { SEASON_TYPES } from '@/process/payments/lib/seasons-constants';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { diff } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { disposableReaction } from '@/utils/mobx';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
export default function unlimitedReactions({ store, apolloClient }: ProcessContext) {
|
||||
const { $calculation, $process } = store;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import type { Elements } from '@/Components/Calculation/config/map/values';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { disposableReaction } from '@/utils/mobx';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { first, sort } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -7,13 +7,13 @@ import { selectObjectCategoryTax } from '@/config/default-options';
|
||||
import { STALE_TIME } from '@/constants/request';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import ValidationHelper from '@/stores/validation/helper';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { debouncedReaction, disposableReaction } from '@/utils/mobx';
|
||||
import type { QueryFunctionContext } from '@tanstack/react-query';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { uid } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/* eslint-disable canonical/sort-keys */
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import { useStore } from '@/stores/hooks';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { useEffect } from 'react';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import { useStore } from '@/stores/hooks';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
import { useEffect } from 'react';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
/**
|
||||
* @param {import('@apollo/client').ApolloClient} apolloClient
|
||||
|
||||
@ -5,10 +5,10 @@ import type { Elements } from '@/Components/Calculation/config/map/values';
|
||||
import { selectLeaseObjectUseFor } from '@/config/default-options';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import ValidationHelper from '@/stores/validation/helper';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { debouncedReaction } from '@/utils/mobx';
|
||||
import { comparer, reaction, toJS } from 'mobx';
|
||||
import { uid } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
export function common({ store, apolloClient }: ProcessContext) {
|
||||
const { $calculation, $tables } = store;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { disposableReaction } from '@/utils/mobx';
|
||||
import { reaction } from 'mobx';
|
||||
import { normalizeOptions } from 'tools/entity';
|
||||
|
||||
export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
const { $calculation, $process } = store;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { reaction } from 'mobx';
|
||||
import { intersects } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
export default function reactions({ store, apolloClient }: ProcessContext) {
|
||||
const { $calculation } = store;
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { uid } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
import { notification } from 'ui/elements';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
@ -5,12 +5,12 @@ import { selectRequirementTelematic } from '@/config/default-options';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { Values } from '@/stores/calculation/values/types';
|
||||
import ValidationHelper from '@/stores/validation/helper';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { debouncedReaction, disposableReaction } from '@/utils/mobx';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { uid } from 'radash';
|
||||
import { normalizeOptions } from 'tools';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import type { AgentsFields, AgentsRewardConditionsFields, AgentsSumFields } from './types';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type RootStore from '@/stores/root';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import { disposableReaction } from '@/utils/mobx';
|
||||
import type { ApolloClient } from '@apollo/client';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { normalizeOptions } from 'tools/entity';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import type { Elements } from '@/Components/Calculation/config/map/values';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type RootStore from '@/stores/root';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import type { ApolloClient } from '@apollo/client';
|
||||
import { normalizeOptions } from 'tools/entity';
|
||||
|
||||
type AgentsLeadProp = keyof Pick<
|
||||
NonNullable<CRMTypes.GetLeadQuery['lead']>,
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import * as createReactions from '../lib/create-reactions';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import type { ProcessContext } from '@/process/types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { reaction } from 'mobx';
|
||||
import { sift } from 'radash';
|
||||
import { normalizeOptions } from 'tools/entity';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@ import type { ValidationContext } from '../types';
|
||||
import type { Elements } from '@/Components/Calculation/config/map/values';
|
||||
import ValuesSchema from '@/config/schema/values';
|
||||
import * as CRMTypes from '@/graphql/crm.types';
|
||||
import { normalizeOptions } from '@/utils/entity';
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { normalizeOptions } from 'tools';
|
||||
import type { RefinementCtx } from 'zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
export * from './array';
|
||||
export * from './common';
|
||||
export * from './entity';
|
||||
export * from './number';
|
||||
export * from './object';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user