process/agents: replace grapghql file with export
This commit is contained in:
parent
8d9dfef7ea
commit
d4330b8edb
@ -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
|
||||
);
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
query GetAgent($agentid: Uuid!) {
|
||||
agent: account(accountid: $agentid) {
|
||||
label: name
|
||||
value: accountid
|
||||
}
|
||||
}
|
||||
12
process/agents/lib/query/get-agent.js
Normal file
12
process/agents/lib/query/get-agent.js
Normal 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;
|
||||
Loading…
x
Reference in New Issue
Block a user