2022-07-14 12:07:24 +03:00

15 lines
465 B
TypeScript

import type { ApolloClient } from '@apollo/client';
import { reaction } from 'mobx';
import type RootStore from 'stores/root';
import { fillIndAgent } from '../lib/fill-agents-from-lead';
export default function commonReactions(store: RootStore, apolloClient: ApolloClient<object>) {
const { $calculation } = store;
reaction(
() => $calculation.getElementValue('selectLead'),
(leadid) => {
fillIndAgent(store, apolloClient, leadid);
}
);
}