add for prev commit: ef9f340
This commit is contained in:
parent
ef9f340ba3
commit
f703524425
@ -465,7 +465,7 @@ const gibddReactions: IReactionEffect[] = [
|
||||
if (evo_city_fias_id) {
|
||||
CrmService.getCRMEntities<'evo_town', IEvoTown>({
|
||||
query: gql`
|
||||
query selectLegalClientTown($evo_fias_id: String) {
|
||||
query legalClientTown($evo_fias_id: String) {
|
||||
evo_town(evo_fias_id: $evo_fias_id) {
|
||||
evo_fias_id
|
||||
evo_townid
|
||||
@ -568,7 +568,7 @@ const gibddReactions: IReactionEffect[] = [
|
||||
if (evo_city_fias_id && objectRegistration === 100000000) {
|
||||
CrmService.getCRMEntities<'evo_town', IEvoTown>({
|
||||
query: gql`
|
||||
query selectTownRegistration($evo_fias_id: String) {
|
||||
query townRegistration($evo_fias_id: String) {
|
||||
evo_town(evo_fias_id: $evo_fias_id) {
|
||||
evo_fias_id
|
||||
evo_townid
|
||||
|
||||
@ -393,7 +393,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
|
||||
const secondaryOptions = await CrmService.getCRMOptions<
|
||||
ElementsNames,
|
||||
keyof IEvoTown
|
||||
IEvoTown
|
||||
>({
|
||||
query: getSecondaryOptionsForQuote,
|
||||
variables: {
|
||||
|
||||
@ -297,7 +297,10 @@ export default [
|
||||
);
|
||||
|
||||
if (indAgentId && !calculationProcess.hasProcess(Process.LoadKp))
|
||||
CrmService.getCRMOptions<'evo_reward_conditions'>({
|
||||
CrmService.getCRMOptions<
|
||||
'evo_reward_conditions',
|
||||
IEvoRewardCondition
|
||||
>({
|
||||
query: gql`
|
||||
query selectIndAgentRewardCondition(
|
||||
$statecode: Int
|
||||
|
||||
@ -26,7 +26,10 @@ import {
|
||||
} from './variables';
|
||||
|
||||
export function composeRequests() {
|
||||
const mainOptionsRequest = CrmService.getCRMOptions<ElementsNames>({
|
||||
const mainOptionsRequest = CrmService.getCRMOptions<
|
||||
ElementsNames,
|
||||
TCRMEntity
|
||||
>({
|
||||
query: getMainOptionsQuery,
|
||||
variables: mainOptionsVariables,
|
||||
});
|
||||
|
||||
@ -2,8 +2,7 @@ import { QueryOptions } from '@apollo/client';
|
||||
import axios from 'axios';
|
||||
import { CRM_PROXY_URL } from 'core/constants/urls';
|
||||
import GQLClient from 'core/graphql/client';
|
||||
import { ElementsNames } from 'core/types/Calculation/Store/elements';
|
||||
import { IQuote, TCRMEntity } from 'core/types/Entities/crmEntities';
|
||||
import { IQuote } from 'core/types/Entities/crmEntities';
|
||||
import { optionizeEntities } from './tools/entity';
|
||||
|
||||
export default class {
|
||||
@ -19,7 +18,7 @@ export default class {
|
||||
>(queryOptions).then(res => res.data);
|
||||
}
|
||||
|
||||
public static getCRMOptions<K extends string = ElementsNames, R = TCRMEntity>(
|
||||
public static getCRMOptions<K extends string, R>(
|
||||
queryOptions: QueryOptions<
|
||||
Partial<Record<keyof R, any>> | Record<string, any>,
|
||||
Record<K, R>
|
||||
|
||||
Reference in New Issue
Block a user