process/load-kp: fix create-kp triggered load-kp

This commit is contained in:
vchikalkin 2023-04-04 15:08:51 +03:00
parent 95040c5a10
commit 75d60246ac

View File

@ -9,8 +9,10 @@ export function common({ store, trpcClient }: ProcessContext) {
const { $calculation, $process, $tables } = store;
reaction(
() => $calculation.element('selectQuote').getOption(),
(quote) => {
() => $calculation.$values.getValue('quote'),
() => {
const quote = $calculation.element('selectQuote').getOption();
if (!quote || $process.has('LoadKP')) return;
$process.add('LoadKP');