process/agents: replace grapghql file with export

This commit is contained in:
Chika 2022-07-15 13:15:51 +03:00
parent 8d9dfef7ea
commit d4330b8edb
3 changed files with 17 additions and 11 deletions

View File

@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
import type { Elements } from 'Components/Calculation/config/map/values';
import type RootStore from 'stores/root';
import { normalizeOptions } from 'tools/entity';
import QueryGetAgent from './query/GetAgent.graphql';
import QUERY_GET_AGENT from './query/get-agent';
import type { GetAgent } from './query/__generated__/GetAgent';
function makeFillAgent(
@ -69,7 +69,7 @@ const QUERY_GET_AGENT_ACCOUNTID = gql`
export const fillIndAgent = makeFillAgent(
'selectIndAgent',
QUERY_GET_AGENT_ACCOUNTID,
QueryGetAgent
QUERY_GET_AGENT
);
/**
@ -90,7 +90,7 @@ const QUERY_GET_DOUBLE_AGENT_ACCOUNTID = gql`
export const fillCalcDoubleAgent = makeFillAgent(
'selectCalcDoubleAgent',
QUERY_GET_DOUBLE_AGENT_ACCOUNTID,
QueryGetAgent
QUERY_GET_AGENT
);
/**
@ -110,7 +110,7 @@ const QUERY_GET_BROKER_ACCOUNTID = gql`
export const fillCalcBroker = makeFillAgent(
'selectCalcBroker',
QUERY_GET_BROKER_ACCOUNTID,
QueryGetAgent
QUERY_GET_AGENT
);
/**
@ -131,5 +131,5 @@ const QUERY_GET_FIN_DEPARTMENT_ACCOUNTID = gql`
export const fillFinDepartment = makeFillAgent(
'selectCalcFinDepartment',
QUERY_GET_FIN_DEPARTMENT_ACCOUNTID,
QueryGetAgent
QUERY_GET_AGENT
);

View File

@ -1,6 +0,0 @@
query GetAgent($agentid: Uuid!) {
agent: account(accountid: $agentid) {
label: name
value: accountid
}
}

View File

@ -0,0 +1,12 @@
import { gql } from '@apollo/client';
const QUERY_GET_AGENT = gql`
query GetAgent($agentid: Uuid!) {
agent: account(accountid: $agentid) {
label: name
value: accountid
}
}
`;
export default QUERY_GET_AGENT;