enable init elt on load-kp

This commit is contained in:
vchikalkin 2024-08-13 15:25:28 +03:00
parent cd0b53f7d6
commit c6f0474f66

View File

@ -1,6 +1,6 @@
import type { ProcessContext } from '../../types';
import helper from '../lib/helper';
import { disposableReaction } from '@/utils/mobx';
import { disposableDebouncedReaction, disposableReaction } from '@/utils/mobx';
import { comparer, toJS } from 'mobx';
export default function reactions(context: ProcessContext) {
@ -9,8 +9,8 @@ export default function reactions(context: ProcessContext) {
const { init } = helper(context);
disposableReaction(
() => $process.has('ELT') || $process.has('LoadKP'),
disposableDebouncedReaction(
() => $process.has('ELT'),
() => ({
values: $calculation.$values.getValues([
'objectRegistration',
@ -55,11 +55,12 @@ export default function reactions(context: ProcessContext) {
delay: 10,
equals: comparer.shallow,
fireImmediately: true,
wait: 100,
}
);
disposableReaction(
() => $process.has('ELT') || $process.has('LoadKP'),
disposableDebouncedReaction(
() => $process.has('ELT'),
() => ({
values: $calculation.$values.getValues([
'legalClientRegion',
@ -111,6 +112,7 @@ export default function reactions(context: ProcessContext) {
delay: 10,
equals: comparer.shallow,
fireImmediately: true,
wait: 100,
}
);