добавить новый параметр "insurancecondition" и в него записывать ID evo_id найденной записи Условия расчета страхования evo_insurance_rules
This commit is contained in:
parent
572bfc8239
commit
3f7798154e
@ -270,6 +270,7 @@ export const ResultEltOsagoSchema = z.object({
|
||||
|
||||
export const RowSchema = z.object({
|
||||
id: z.string(),
|
||||
insuranceCondition: z.string().nullable(),
|
||||
key: z.string(),
|
||||
message: z.string().nullable(),
|
||||
metodCalc: z.union([z.literal('CRM'), z.literal('ELT')]),
|
||||
|
||||
@ -263,6 +263,8 @@ export async function convertEltKaskoResponse(input: ConvertEltKaskoResponseInpu
|
||||
null as Rule
|
||||
);
|
||||
|
||||
const insuranceCondition = selectedRule?.evo_id ?? null;
|
||||
|
||||
if (selectedRule) {
|
||||
const rule_evo_discount = selectedRule.evo_discount ?? 0;
|
||||
|
||||
@ -314,6 +316,7 @@ export async function convertEltKaskoResponse(input: ConvertEltKaskoResponseInpu
|
||||
|
||||
return {
|
||||
...row,
|
||||
insuranceCondition,
|
||||
message: error || message,
|
||||
numCalc: '0',
|
||||
requestId,
|
||||
|
||||
@ -2,6 +2,7 @@ import type * as ELT from '@/Components/Calculation/Form/ELT/types';
|
||||
|
||||
export const defaultRow: ELT.Row = {
|
||||
id: '',
|
||||
insuranceCondition: null,
|
||||
key: '',
|
||||
message: null,
|
||||
metodCalc: 'ELT',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user