WIP jordan
This commit is contained in:
47
app/composables/useClientRegistrationModel.ts
Normal file
47
app/composables/useClientRegistrationModel.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { ClientCaptureMeta, ClientRegistrationNatural } from '~/types/brokerage-registration'
|
||||
|
||||
export function createEmptyClientRegistration(): ClientRegistrationNatural {
|
||||
return {
|
||||
id: '',
|
||||
economicGroupId: '',
|
||||
conglomerateId: '',
|
||||
personType: 'natural',
|
||||
apellidoPaterno: '',
|
||||
apellidoMaterno: '',
|
||||
primerNombre: '',
|
||||
segundoNombre: '',
|
||||
fechaNacimiento: '',
|
||||
tipoIdentificacion: '',
|
||||
cedulaOPasaporte: '',
|
||||
telefonoCelular: '',
|
||||
correoElectronicoPersonal: '',
|
||||
ocupacion: '',
|
||||
procedencia: '',
|
||||
detalle: '',
|
||||
descripcion: ''
|
||||
}
|
||||
}
|
||||
|
||||
export function useClientCaptureMeta(): ClientCaptureMeta {
|
||||
const now = new Date()
|
||||
return {
|
||||
operadorId: '32',
|
||||
operadorNombre: 'Jordan',
|
||||
fechaCaptura: now.toISOString(),
|
||||
progresoCapturaPct: 6,
|
||||
estado: ''
|
||||
}
|
||||
}
|
||||
|
||||
export function toIndividualCustomerBody(r: ClientRegistrationNatural) {
|
||||
const last = [r.apellidoPaterno, r.apellidoMaterno].filter(Boolean).join(' ').trim()
|
||||
return {
|
||||
first_name: [r.primerNombre, r.segundoNombre].filter(Boolean).join(' ').trim() || r.primerNombre,
|
||||
last_name: last || '-',
|
||||
email: r.correoElectronicoPersonal.trim(),
|
||||
phone: r.telefonoCelular.trim(),
|
||||
birth_date: r.fechaNacimiento,
|
||||
gender: '',
|
||||
document_id: r.cedulaOPasaporte.trim()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user