- Update life quote types to use insured/buyer instead of client - Update life fields: add coverage_type, coverage_amount, coverage_years, smoker, medications, surgeries, weight, height - Remove deprecated fields: dateOfBirth, age, gender, preexistingConditions, preexistingDetails, beneficiaryName, beneficiaryRelationship - Update life quote SetupStep component to use customer selection - Add Insured and Buyer sections with customer search and selection - Add health questionnaire with smoker, medications, surgeries, weight, height fields - Add coverage_type field (banking | protection) - Update life quote page to use new composables and API structure - Update validation to use insured/buyer validation - Update submission to use policy API with new structure
40 lines
960 B
TypeScript
40 lines
960 B
TypeScript
export type LifeQuoteMode = 'single' | 'comparative_pdf'
|
|
|
|
export type LifeQuoteSegment = 'individual' | 'corporate_keyman' | 'group'
|
|
|
|
export type LifeQuoteDraft = {
|
|
quoteMode: LifeQuoteMode | null
|
|
segment: LifeQuoteSegment | null
|
|
insured: any | null
|
|
buyer: any | null
|
|
/** Life-specific subscriber details */
|
|
life: {
|
|
coverage_type: 'banking' | 'protection'
|
|
coverage_amount: number
|
|
coverage_years: number
|
|
smoker: boolean
|
|
medications: string
|
|
surgeries: string
|
|
weight: number
|
|
height: number
|
|
}
|
|
/** Mock: forms marked complete to proceed */
|
|
forms: {
|
|
medicalQuestionnaire: boolean
|
|
beneficiaryDesignation: boolean
|
|
groupCensus: boolean
|
|
}
|
|
solicit: {
|
|
carrierIds: string[]
|
|
planIds: string[]
|
|
}
|
|
}
|
|
|
|
export type LifeQuoteIntakePayload = {
|
|
policy_type: 'life'
|
|
insured: any
|
|
buyer: any
|
|
policy_details: LifeQuoteDraft['life']
|
|
selected_providers: Array<{ provider_id: string; email: string }>
|
|
}
|