diff --git a/graphql/crm.types.ts b/graphql/crm.types.ts index 8bde883..01d1700 100644 --- a/graphql/crm.types.ts +++ b/graphql/crm.types.ts @@ -267,6 +267,13 @@ export type GetRewardSummQueryVariables = Exact<{ export type GetRewardSummQuery = { __typename?: 'Query', evo_reward_condition?: { __typename?: 'evo_reward_condition', evo_reward_summ?: any | null } | null }; +export type GetRewardConditionQueryVariables = Exact<{ + conditionId: Scalars['Uuid']; +}>; + + +export type GetRewardConditionQuery = { __typename?: 'Query', evo_reward_condition?: { __typename?: 'evo_reward_condition', evo_reward_summ?: any | null, evo_reduce_reward?: boolean | null, evo_min_reward_summ?: any | null } | null }; + export type GetAgentAccountIdFromLeadQueryVariables = Exact<{ leadid: Scalars['Uuid']; }>; @@ -302,13 +309,6 @@ export type GetAgentQueryVariables = Exact<{ export type GetAgentQuery = { __typename?: 'Query', agent?: { __typename?: 'account', label?: string | null, value?: any | null } | null }; -export type GetRewardConditionQueryVariables = Exact<{ - conditionId: Scalars['Uuid']; -}>; - - -export type GetRewardConditionQuery = { __typename?: 'Query', evo_reward_condition?: { __typename?: 'evo_reward_condition', evo_reward_summ?: any | null, evo_reduce_reward?: boolean | null, evo_min_reward_summ?: any | null, evo_calc_reward_rules?: number | null } | null }; - export type GetRewardWithoutOtherAgentQueryVariables = Exact<{ conditionId: Scalars['Uuid']; }>; @@ -321,7 +321,7 @@ export type GetDealerPersonQueryVariables = Exact<{ }>; -export type GetDealerPersonQuery = { __typename?: 'Query', salon_providers?: Array<{ __typename?: 'account', label?: string | null, value?: any | null } | null> | null }; +export type GetDealerPersonQuery = { __typename?: 'Query', salon_providers?: Array<{ __typename?: 'account', evo_inn?: string | null, evo_kpp?: string | null, label?: string | null, value?: any | null } | null> | null }; export type GetBrokerAccountIdFromDealerQueryVariables = Exact<{ dealerId: Scalars['Uuid']; diff --git a/process/supplier-agent/reactions/supplier.ts b/process/supplier-agent/reactions/supplier.ts index aa14393..8df291c 100644 --- a/process/supplier-agent/reactions/supplier.ts +++ b/process/supplier-agent/reactions/supplier.ts @@ -5,6 +5,7 @@ import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import type * as CRMTypes from 'graphql/crm.types'; import { reaction } from 'mobx'; +import { sift } from 'radash'; import type RootStore from 'stores/root'; import { normalizeOptions } from 'tools/entity'; import * as createReactions from '../lib/create-reactions'; @@ -27,6 +28,8 @@ export function commonReactions(store: RootStore, apolloClient: ApolloClient ({ + ...dp, + label: `${dp?.label} ${sift([dp?.evo_inn, dp?.evo_kpp]).join(' | ')}`, + })) + ) + ); if (!$process.has('LoadKP')) { $calculation.element('selectDealerPerson').setValue(salon_providers[0]?.value);