WIP jordan
This commit is contained in:
14
app/types/app-theme.ts
Normal file
14
app/types/app-theme.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export type AppThemeId = 'light' | 'purple' | 'dark' | 'dark-purple'
|
||||
|
||||
export type AppThemeMeta = {
|
||||
id: AppThemeId
|
||||
label: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export const APP_THEME_OPTIONS: AppThemeMeta[] = [
|
||||
{ id: 'light', label: 'Stone', description: 'Petroleum teal on warm stone — default.' },
|
||||
{ id: 'purple', label: 'Aubergine', description: 'Muted plum accent on warm stone.' },
|
||||
{ id: 'dark', label: 'Carbon', description: 'Warm dark with teal accent — low fatigue.' },
|
||||
{ id: 'dark-purple', label: 'Dusk', description: 'Deep plum with soft violet accent.' }
|
||||
]
|
||||
46
app/types/auto-quote-intake.ts
Normal file
46
app/types/auto-quote-intake.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
export type AutoQuoteMode = 'single' | 'comparative_pdf'
|
||||
|
||||
export type AutoQuoteSegment = 'individual' | 'corporate' | 'fleet'
|
||||
|
||||
export type AutoQuoteClient = {
|
||||
fullName: string
|
||||
email: string
|
||||
phone: string
|
||||
/** Cédula / pasaporte / ID */
|
||||
documentId: string
|
||||
/** Used when segment is corporate or fleet */
|
||||
organizationName: string
|
||||
}
|
||||
|
||||
export type AutoQuoteVehicle = {
|
||||
subRamo: string
|
||||
clase: string
|
||||
uso: string
|
||||
marca: string
|
||||
modelo: string
|
||||
placa: string
|
||||
year: string | null
|
||||
capacidadPasajeros: string
|
||||
valorVehiculo: string
|
||||
}
|
||||
|
||||
export type AutoQuoteSolicit = {
|
||||
carrierIds: string[]
|
||||
planIds: string[]
|
||||
}
|
||||
|
||||
export type AutoQuoteDraft = {
|
||||
quoteMode: AutoQuoteMode | null
|
||||
segment: AutoQuoteSegment | null
|
||||
client: AutoQuoteClient
|
||||
vehicle: AutoQuoteVehicle
|
||||
solicit: AutoQuoteSolicit
|
||||
}
|
||||
|
||||
export type AutoQuoteIntakePayload = {
|
||||
quoteMode: AutoQuoteMode
|
||||
segment: AutoQuoteSegment
|
||||
client: AutoQuoteClient
|
||||
vehicle: AutoQuoteVehicle
|
||||
solicit: AutoQuoteSolicit
|
||||
}
|
||||
10
app/types/branding.ts
Normal file
10
app/types/branding.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export type BrokerageBrandingState = {
|
||||
companyName: string
|
||||
logoDataUrl: string | null
|
||||
logoFileName: string
|
||||
reportPageHeader: string
|
||||
reportPageFooter: string
|
||||
}
|
||||
|
||||
export const BRANDING_STORAGE_KEY = 'policy-ui-brokerage-branding-v1'
|
||||
export const MAX_LOGO_FILE_BYTES = 600_000
|
||||
69
app/types/brokerage-registration.ts
Normal file
69
app/types/brokerage-registration.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/** Natural-person client row (NUEVO REGISTRO | CLIENTE) */
|
||||
export type ClientRegistrationNatural = {
|
||||
id: string
|
||||
economicGroupId: string
|
||||
conglomerateId: string
|
||||
personType: 'natural' | 'juridica'
|
||||
apellidoPaterno: string
|
||||
apellidoMaterno: string
|
||||
primerNombre: string
|
||||
segundoNombre: string
|
||||
fechaNacimiento: string
|
||||
tipoIdentificacion: string
|
||||
cedulaOPasaporte: string
|
||||
telefonoCelular: string
|
||||
correoElectronicoPersonal: string
|
||||
ocupacion: string
|
||||
procedencia: string
|
||||
detalle: string
|
||||
descripcion: string
|
||||
}
|
||||
|
||||
export type ClientCaptureMeta = {
|
||||
operadorId: string
|
||||
operadorNombre: string
|
||||
fechaCaptura: string
|
||||
progresoCapturaPct: number
|
||||
estado: string
|
||||
}
|
||||
|
||||
export type PolicyCommissionRow = {
|
||||
idx: number
|
||||
agenteId: string
|
||||
porcentaje: string
|
||||
}
|
||||
|
||||
export type PolicyInstallmentRow = {
|
||||
n: number
|
||||
fechaVencimiento: string
|
||||
prima: string
|
||||
}
|
||||
|
||||
export type PolicyRegistration = {
|
||||
mintPolicyNumber: string
|
||||
contratanteId: string
|
||||
ramo: string
|
||||
subRamo: string
|
||||
aseguradora: string
|
||||
producto: string
|
||||
agencia: string
|
||||
numeroPolizaProveedor: string
|
||||
acreedor: string
|
||||
fechaEmision: string
|
||||
inicioVigencia: string
|
||||
finVigencia: string
|
||||
comisiones: PolicyCommissionRow[]
|
||||
formaPago: string
|
||||
valorAsegurado: string
|
||||
primaBruta: string
|
||||
impuestoPct: string
|
||||
primaNeta: string
|
||||
numCuotas: number
|
||||
cuotas: PolicyInstallmentRow[]
|
||||
cotizacionMintId: string
|
||||
pdfCotizacionNombre: string
|
||||
pdfPolizaNombre: string
|
||||
notas: string
|
||||
}
|
||||
|
||||
export const POLICY_DRAFT_STORAGE_KEY = 'policy-registration-draft-v1'
|
||||
55
app/types/customer-profile.ts
Normal file
55
app/types/customer-profile.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
export type CustomerProfileVault = {
|
||||
version: number
|
||||
full_name: string
|
||||
document_id: string
|
||||
document_expiry: string
|
||||
nationality: string
|
||||
smoking: boolean
|
||||
height_cm: string
|
||||
weight_kg: string
|
||||
medical_conditions: string
|
||||
plate: string
|
||||
vin: string
|
||||
year: string
|
||||
use_type: string
|
||||
declared_value: string
|
||||
network: string
|
||||
deductible_usd: string
|
||||
preexisting_disclosure: string
|
||||
coverage_zone: string
|
||||
usa_cover: string
|
||||
repatriation: string
|
||||
address: string
|
||||
construction_type: string
|
||||
contents_sum: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export function emptyCustomerProfile(): CustomerProfileVault {
|
||||
return {
|
||||
version: 1,
|
||||
full_name: '',
|
||||
document_id: '',
|
||||
document_expiry: '',
|
||||
nationality: '',
|
||||
smoking: false,
|
||||
height_cm: '',
|
||||
weight_kg: '',
|
||||
medical_conditions: '',
|
||||
plate: '',
|
||||
vin: '',
|
||||
year: '',
|
||||
use_type: '',
|
||||
declared_value: '',
|
||||
network: '',
|
||||
deductible_usd: '',
|
||||
preexisting_disclosure: '',
|
||||
coverage_zone: '',
|
||||
usa_cover: '',
|
||||
repatriation: '',
|
||||
address: '',
|
||||
construction_type: '',
|
||||
contents_sum: '',
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
}
|
||||
40
app/types/form-catalog.ts
Normal file
40
app/types/form-catalog.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
export type FormCatalogPersonKind = 'natural' | 'juridica' | 'both'
|
||||
|
||||
export type FormCatalogProductLine =
|
||||
| 'life'
|
||||
| 'health_local'
|
||||
| 'health_international'
|
||||
| 'auto_full_coverage'
|
||||
| 'auto_dat_liability'
|
||||
| 'home'
|
||||
| 'general_liability'
|
||||
| 'any'
|
||||
|
||||
export type FormCatalogEntryKind = 'carrier_pdf' | 'identity' | 'other'
|
||||
|
||||
export type FormCatalogRow = {
|
||||
id: number
|
||||
description: string
|
||||
insurerSlugs: string[]
|
||||
subRamoKey: string
|
||||
subRamoLabel: string
|
||||
personKinds: FormCatalogPersonKind
|
||||
productLine: FormCatalogProductLine | null
|
||||
fileUrl: string
|
||||
fileLabel: string
|
||||
badge?: string | number
|
||||
kind?: FormCatalogEntryKind
|
||||
fieldGroupIds?: string[]
|
||||
}
|
||||
|
||||
export type FormCatalogFile = {
|
||||
version: number
|
||||
rows: FormCatalogRow[]
|
||||
}
|
||||
|
||||
export type FormCatalogSelection = {
|
||||
insurerSlug: string | null
|
||||
subRamoKey: string | null
|
||||
personKind: 'natural' | 'juridica'
|
||||
productLine: FormCatalogProductLine | 'any' | null
|
||||
}
|
||||
11
app/types/form-field-groups.ts
Normal file
11
app/types/form-field-groups.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export type FormFieldGroupDef = {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
fieldKeys: string[]
|
||||
}
|
||||
|
||||
export type FormFieldGroupsFile = {
|
||||
version: number
|
||||
groups: FormFieldGroupDef[]
|
||||
}
|
||||
40
app/types/health-quote-intake.ts
Normal file
40
app/types/health-quote-intake.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { AutoQuoteClient } from '~/types/auto-quote-intake'
|
||||
|
||||
export type HealthQuoteMode = 'single' | 'comparative_pdf'
|
||||
|
||||
export type HealthQuoteSegment = 'individual' | 'corporate' | 'group'
|
||||
|
||||
export type HealthQuoteDraft = {
|
||||
quoteMode: HealthQuoteMode | null
|
||||
segment: HealthQuoteSegment | null
|
||||
client: AutoQuoteClient
|
||||
/** Coverage / product context */
|
||||
health: {
|
||||
coverageArea: '' | 'local' | 'international'
|
||||
networkTier: string
|
||||
deductible: string
|
||||
/** Subscriber screening */
|
||||
dateOfBirth: string
|
||||
age: string
|
||||
preexistingConditions: boolean
|
||||
preexistingDetails: string
|
||||
}
|
||||
/** Mock: forms marked complete to proceed */
|
||||
forms: {
|
||||
medicalQuestionnaire: boolean
|
||||
beneficiaryDesignation: boolean
|
||||
groupCensus: boolean
|
||||
}
|
||||
solicit: {
|
||||
carrierIds: string[]
|
||||
planIds: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export type HealthQuoteIntakePayload = {
|
||||
quoteMode: HealthQuoteMode
|
||||
segment: HealthQuoteSegment
|
||||
client: AutoQuoteClient
|
||||
health: HealthQuoteDraft['health']
|
||||
solicit: HealthQuoteDraft['solicit']
|
||||
}
|
||||
42
app/types/life-quote-intake.ts
Normal file
42
app/types/life-quote-intake.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { AutoQuoteClient } from '~/types/auto-quote-intake'
|
||||
|
||||
export type LifeQuoteMode = 'single' | 'comparative_pdf'
|
||||
|
||||
export type LifeQuoteSegment = 'individual' | 'corporate_keyman' | 'group'
|
||||
|
||||
export type LifeQuoteDraft = {
|
||||
quoteMode: LifeQuoteMode | null
|
||||
segment: LifeQuoteSegment | null
|
||||
client: AutoQuoteClient
|
||||
/** Life-specific subscriber details */
|
||||
life: {
|
||||
dateOfBirth: string
|
||||
age: string
|
||||
gender: string
|
||||
smoker: boolean
|
||||
preexistingConditions: boolean
|
||||
preexistingDetails: string
|
||||
coverageAmount: string
|
||||
coverageTerm: string
|
||||
beneficiaryName: string
|
||||
beneficiaryRelationship: string
|
||||
}
|
||||
/** Mock: forms marked complete to proceed */
|
||||
forms: {
|
||||
medicalQuestionnaire: boolean
|
||||
beneficiaryDesignation: boolean
|
||||
groupCensus: boolean
|
||||
}
|
||||
solicit: {
|
||||
carrierIds: string[]
|
||||
planIds: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export type LifeQuoteIntakePayload = {
|
||||
quoteMode: LifeQuoteMode
|
||||
segment: LifeQuoteSegment
|
||||
client: AutoQuoteClient
|
||||
life: LifeQuoteDraft['life']
|
||||
solicit: LifeQuoteDraft['solicit']
|
||||
}
|
||||
9
app/types/pdf-field-mapping.ts
Normal file
9
app/types/pdf-field-mapping.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type PdfFieldMappingRow = {
|
||||
catalogFormId: number
|
||||
fields: Record<string, string>
|
||||
}
|
||||
|
||||
export type PdfFieldMappingFile = {
|
||||
version: number
|
||||
mappings: PdfFieldMappingRow[]
|
||||
}
|
||||
58
app/types/provider-contacts.ts
Normal file
58
app/types/provider-contacts.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
export type ProviderEmailRole =
|
||||
| 'general'
|
||||
| 'claims'
|
||||
| 'renewals'
|
||||
| 'management'
|
||||
| 'general_risk_quotes'
|
||||
| 'auto_full_coverage_quotes'
|
||||
| 'auto_dat_quotes'
|
||||
| 'health_local_quotes'
|
||||
| 'health_international_quotes'
|
||||
| 'other_quotes'
|
||||
| 'other'
|
||||
|
||||
export type ProviderContactEmails = Record<ProviderEmailRole, string>
|
||||
|
||||
export const PROVIDER_EMAIL_ROLE_ORDER: ProviderEmailRole[] = [
|
||||
'general',
|
||||
'claims',
|
||||
'renewals',
|
||||
'management',
|
||||
'general_risk_quotes',
|
||||
'auto_full_coverage_quotes',
|
||||
'auto_dat_quotes',
|
||||
'health_local_quotes',
|
||||
'health_international_quotes',
|
||||
'other_quotes',
|
||||
'other'
|
||||
]
|
||||
|
||||
export const PROVIDER_EMAIL_ROLE_LABEL: Record<ProviderEmailRole, string> = {
|
||||
general: 'General',
|
||||
claims: 'Claims',
|
||||
renewals: 'Renewals',
|
||||
management: 'Management',
|
||||
general_risk_quotes: 'General risk quotes',
|
||||
auto_full_coverage_quotes: 'Auto · full coverage quotes',
|
||||
auto_dat_quotes: 'Auto · DAT (liability) quotes',
|
||||
health_local_quotes: 'Health · local quotes',
|
||||
health_international_quotes: 'Health · international quotes',
|
||||
other_quotes: 'Other quotes',
|
||||
other: 'Other'
|
||||
}
|
||||
|
||||
export function emptyProviderContacts(): ProviderContactEmails {
|
||||
return {
|
||||
general: '',
|
||||
claims: '',
|
||||
renewals: '',
|
||||
management: '',
|
||||
general_risk_quotes: '',
|
||||
auto_full_coverage_quotes: '',
|
||||
auto_dat_quotes: '',
|
||||
health_local_quotes: '',
|
||||
health_international_quotes: '',
|
||||
other_quotes: '',
|
||||
other: ''
|
||||
}
|
||||
}
|
||||
48
app/types/quote-view-model.ts
Normal file
48
app/types/quote-view-model.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
export type QuoteClientSnapshot = {
|
||||
name: string
|
||||
ageYears: number
|
||||
gender: 'Femenino' | 'Masculino' | 'Otro'
|
||||
smoker: boolean
|
||||
riskClass: string
|
||||
occupation: string
|
||||
}
|
||||
|
||||
export type QuoteRequestSnapshot = {
|
||||
sumAssuredUsd: number
|
||||
monthlyPremiumUsd: number
|
||||
annualPremiumUsd: number
|
||||
benefitTypeLabel: string
|
||||
additionalCoverageLabel: string
|
||||
initialDepositLabel: string
|
||||
}
|
||||
|
||||
export type QuoteSavingsCell = {
|
||||
yearLabel: string
|
||||
ageLabel: string
|
||||
guaranteed: number
|
||||
projected: number
|
||||
}
|
||||
|
||||
export type QuoteCarrierProductRow = {
|
||||
carrierName: string
|
||||
productName: string
|
||||
ratesLine: string
|
||||
sumAssuredUsd: number
|
||||
cells: QuoteSavingsCell[]
|
||||
highlightProjectedUsd?: number
|
||||
highlightNote?: string
|
||||
footnote?: string
|
||||
}
|
||||
|
||||
export type QuoteComparativeView = {
|
||||
title: string
|
||||
subtitle: string
|
||||
tagline: string
|
||||
quoteDateIso: string
|
||||
validDays: number
|
||||
client: QuoteClientSnapshot
|
||||
request: QuoteRequestSnapshot
|
||||
carriers: QuoteCarrierProductRow[]
|
||||
accumulatedPremiumsUsd: number[]
|
||||
advisorColumns: [string, string, string]
|
||||
}
|
||||
15
app/types/roles.ts
Normal file
15
app/types/roles.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export type SegurosPermissionKey =
|
||||
| 'profile'
|
||||
| 'portfolio'
|
||||
| 'layers'
|
||||
| 'tasks'
|
||||
| 'billing'
|
||||
| 'analytics'
|
||||
| 'support'
|
||||
|
||||
export type RoleRow = {
|
||||
id: number
|
||||
description: string
|
||||
active: boolean
|
||||
seguros: Record<SegurosPermissionKey, boolean>
|
||||
}
|
||||
38
app/types/welcome-dashboard.ts
Normal file
38
app/types/welcome-dashboard.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
export type WelcomeDashboardKpi = {
|
||||
id: string
|
||||
label: string
|
||||
value: string
|
||||
hint?: string
|
||||
change?: string
|
||||
changeTone?: 'positive' | 'negative' | 'neutral'
|
||||
}
|
||||
|
||||
export type WelcomeDashboardTask = {
|
||||
id: string
|
||||
title: string
|
||||
emphasis?: boolean
|
||||
}
|
||||
|
||||
export type WelcomeDashboardAlert = {
|
||||
id: string
|
||||
message: string
|
||||
tone: 'info' | 'warning' | 'error' | 'success' | string
|
||||
}
|
||||
|
||||
export type WelcomeDashboardQuickLink = {
|
||||
label: string
|
||||
to: string
|
||||
icon: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export type WelcomeDashboardConfig = {
|
||||
greetingName: string
|
||||
productName: string
|
||||
subtitle: string
|
||||
dailyTasks: WelcomeDashboardTask[]
|
||||
alerts: WelcomeDashboardAlert[]
|
||||
performanceKpis: WelcomeDashboardKpi[]
|
||||
ceoKpis: WelcomeDashboardKpi[]
|
||||
quickLinks: WelcomeDashboardQuickLink[]
|
||||
}
|
||||
Reference in New Issue
Block a user