diff --git a/process/agents/reactions/index.js b/process/agents/reactions/index.js deleted file mode 100644 index 1e2e8e6..0000000 --- a/process/agents/reactions/index.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable import/prefer-default-export */ -export { default as common } from './common'; diff --git a/process/init/inject-reactions/default.js b/process/init/inject-reactions/default.js index 40b4245..c05f968 100644 --- a/process/init/inject-reactions/default.js +++ b/process/init/inject-reactions/default.js @@ -1,9 +1,10 @@ -import * as agentsReactions from '../../agents/reactions'; import * as calculateReactions from '../../calculate/reactions'; import * as fingapReactions from '../../fingap/reactions'; import * as leadOpportunityReactions from '../../lead-opportunity/reactions'; import paymentsReactions from '../../payments/reactions'; import * as priceReactions from '../../price/reactions'; +import * as agentsReactions from '../../supplier-agent/reactions/agents'; +import * as supplierReactions from '../../supplier-agent/reactions/supplier'; import setInitialValuesReactions from '../set-values/reactions'; export default function injectDefaultReactions(store, apolloClient, queryClient) { @@ -11,7 +12,10 @@ export default function injectDefaultReactions(store, apolloClient, queryClient) leadOpportunityReactions.urls(store, apolloClient, queryClient); paymentsReactions(store, apolloClient, queryClient); calculateReactions.validation(store, apolloClient, queryClient); - agentsReactions.common(store, apolloClient, queryClient); + supplierReactions.commonReactions(store, apolloClient, queryClient); + supplierReactions.validationReactions(store, apolloClient, queryClient); + agentsReactions.commonReactions(store, apolloClient, queryClient); + agentsReactions.validationReactions(store, apolloClient, queryClient); priceReactions.computed(store, apolloClient, queryClient); fingapReactions.common(store, apolloClient, queryClient); fingapReactions.validation(store, apolloClient, queryClient); diff --git a/process/agents/lib/fill-agents-from-lead.ts b/process/supplier-agent/lib/fill-agents-from-lead.ts similarity index 100% rename from process/agents/lib/fill-agents-from-lead.ts rename to process/supplier-agent/lib/fill-agents-from-lead.ts diff --git a/process/agents/lib/query.ts b/process/supplier-agent/lib/query.ts similarity index 100% rename from process/agents/lib/query.ts rename to process/supplier-agent/lib/query.ts diff --git a/process/supplier-agent/reactions/agents.ts b/process/supplier-agent/reactions/agents.ts new file mode 100644 index 0000000..d530482 --- /dev/null +++ b/process/supplier-agent/reactions/agents.ts @@ -0,0 +1,6 @@ +import type { ApolloClient } from '@apollo/client'; +import type RootStore from 'stores/root'; + +export function commonReactions(store: RootStore, apolloClient: ApolloClient) {} + +export function validationReactions(store: RootStore, apolloClient: ApolloClient) {} diff --git a/process/agents/reactions/common.ts b/process/supplier-agent/reactions/supplier.ts similarity index 98% rename from process/agents/reactions/common.ts rename to process/supplier-agent/reactions/supplier.ts index 535f7b5..ce3e098 100644 --- a/process/agents/reactions/common.ts +++ b/process/supplier-agent/reactions/supplier.ts @@ -14,7 +14,7 @@ import { QUERY_GET_AGENT } from '../lib/query'; dayjs.extend(utc); -export default function commonReactions(store: RootStore, apolloClient: ApolloClient) { +export function commonReactions(store: RootStore, apolloClient: ApolloClient) { const { $calculation, $process } = store; /** @@ -326,3 +326,5 @@ export default function commonReactions(store: RootStore, apolloClient: ApolloCl } ); } + +export function validationReactions(store: RootStore, apolloClient: ApolloClient) {}