fix load-kp
This commit is contained in:
parent
70e4dbf408
commit
7e17f67ef8
@ -73,6 +73,7 @@ export default function loadKpReactions({ store, trpcClient }: ReactionsContext)
|
||||
content: `Ошибка во время загрузки КП ${quoteName}`,
|
||||
key,
|
||||
});
|
||||
$calculation.element('selectQuote').resetValue();
|
||||
})
|
||||
.finally(() => {
|
||||
$process.delete('LoadKP');
|
||||
|
||||
@ -10,6 +10,7 @@ import { GetQuoteDataInputSchema, GetQuoteDataOutputSchema } from '@/process/loa
|
||||
import getPaymentsDataFromKP from '@/process/payments/get-kp-data';
|
||||
import getPriceDataFromKP from '@/process/price/get-kp-data';
|
||||
import getSupplierAgentsDataFromKP from '@/process/supplier-agent/get-kp-values';
|
||||
import { shake } from 'radash';
|
||||
|
||||
const DEFAULT_OSAGO_ROW = defaultInsuranceValues.find((x) => x.key === 'osago');
|
||||
const DEFAULT_KASKO_ROW = defaultInsuranceValues.find((x) => x.key === 'kasko');
|
||||
@ -27,15 +28,20 @@ const quoteRouter = t.router({
|
||||
const { values: leasingObjectValues } = await getLeasingObjectDataFromKP(input);
|
||||
const { fingap, insurance: fingapInsurance } = await getFingapDataFromKP(input);
|
||||
|
||||
// TODO: remove this temp fix
|
||||
const quoteValues = shake({
|
||||
...configuratorValues,
|
||||
...supplierAgentsValues,
|
||||
...paymentsValues,
|
||||
...priceValues,
|
||||
...bonusValues,
|
||||
...leasingObjectValues,
|
||||
});
|
||||
|
||||
return {
|
||||
values: {
|
||||
...defaultValues,
|
||||
...configuratorValues,
|
||||
...supplierAgentsValues,
|
||||
...paymentsValues,
|
||||
...priceValues,
|
||||
...bonusValues,
|
||||
...leasingObjectValues,
|
||||
...quoteValues,
|
||||
},
|
||||
payments,
|
||||
insurance: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user