elt: get insuranceCondition from quote
This commit is contained in:
parent
7dcae62f5f
commit
26aa09a5e4
@ -310,6 +310,12 @@ query GetQuoteData($quoteId: UUID!) {
|
||||
evo_equip_price
|
||||
evo_coefficien_bonus_reducttion
|
||||
evo_accept_limit_quote
|
||||
evo_kasko_insurance_rulesidData {
|
||||
evo_id
|
||||
}
|
||||
evo_osago_insurance_rulesiddData {
|
||||
evo_id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2821,6 +2821,8 @@ type quote {
|
||||
evo_req_telematicname: String
|
||||
evo_req_telematic_acceptname: String
|
||||
evo_question_credit_committees: [evo_question_credit_committee]
|
||||
evo_kasko_insurance_rulesidData: evo_insurance_rules
|
||||
evo_osago_insurance_rulesiddData: evo_insurance_rules
|
||||
ownerid_systemuserData: systemuser
|
||||
ownerid_teamData: team
|
||||
link: String
|
||||
@ -6041,6 +6043,7 @@ type evo_insurance_rules {
|
||||
overriddencreatedon: DateTime
|
||||
evo_dateto: DateTime
|
||||
evo_datefrom: DateTime
|
||||
evo_opf: Int
|
||||
evo_risk: Int
|
||||
evo_max_year: Int
|
||||
evo_object_type: Int
|
||||
@ -6078,7 +6081,6 @@ type evo_insurance_rules {
|
||||
evo_insurer_accountidyominame: String
|
||||
modifiedonbehalfbyyominame: String
|
||||
organizationidname: String
|
||||
evo_opf: [Int!]
|
||||
evo_use_for: [Int!]
|
||||
evo_enginie_type: [Int!]
|
||||
evo_category: [Int!]
|
||||
@ -6094,6 +6096,15 @@ type evo_insurance_rules {
|
||||
accounts: [account]
|
||||
evo_riskname: String
|
||||
evo_rules_typename: String
|
||||
evo_brandname: String
|
||||
evo_modelname: String
|
||||
evo_regionname: String
|
||||
evo_dealername: String
|
||||
evo_categorynames: [String]
|
||||
evo_use_fornames: [String]
|
||||
evo_enginie_typenames: [String]
|
||||
evo_opfname: String
|
||||
evo_object_typename: String
|
||||
ownerid_systemuser: UUID
|
||||
ownerid_team: UUID
|
||||
ownerid_systemuserData: systemuser
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,4 +1,5 @@
|
||||
import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
|
||||
import { defaultRow } from '@/stores/tables/elt/default-values';
|
||||
|
||||
export async function getKPData({ quote }: GetQuoteInputData): Promise<GetQuoteProcessData> {
|
||||
const elt: NonNullable<GetQuoteProcessData['elt']> = { kasko: undefined, osago: undefined };
|
||||
@ -11,6 +12,8 @@ export async function getKPData({ quote }: GetQuoteInputData): Promise<GetQuoteP
|
||||
quote?.evo_franchise !== null
|
||||
) {
|
||||
elt.kasko = {
|
||||
insuranceCondition:
|
||||
quote.evo_kasko_insurance_rulesidData?.evo_id ?? defaultRow.insuranceCondition,
|
||||
key: quote?.evo_kasko_accountid,
|
||||
requestId: quote?.evo_id_elt_kasko,
|
||||
skCalcId: quote?.evo_id_kasko_calc,
|
||||
@ -21,6 +24,8 @@ export async function getKPData({ quote }: GetQuoteInputData): Promise<GetQuoteP
|
||||
|
||||
if (quote?.evo_osago_accountid && quote?.evo_id_elt_osago && quote?.evo_osago_price) {
|
||||
elt.osago = {
|
||||
insuranceCondition:
|
||||
quote.evo_osago_insurance_rulesiddData?.evo_id ?? defaultRow.insuranceCondition,
|
||||
key: quote?.evo_osago_accountid,
|
||||
numCalc: quote?.evo_id_elt_osago,
|
||||
sum: quote?.evo_osago_price,
|
||||
|
||||
@ -48,6 +48,7 @@ export const GetQuoteOutputDataSchema = z
|
||||
elt: z
|
||||
.object({
|
||||
kasko: EltRowSchema.pick({
|
||||
insuranceCondition: true,
|
||||
key: true,
|
||||
requestId: true,
|
||||
skCalcId: true,
|
||||
@ -55,6 +56,7 @@ export const GetQuoteOutputDataSchema = z
|
||||
totalFranchise: true,
|
||||
}).optional(),
|
||||
osago: EltRowSchema.pick({
|
||||
insuranceCondition: true,
|
||||
key: true,
|
||||
numCalc: true,
|
||||
sum: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user