feat(8-mejoras): cancelar+motivo, brocker, etapas, calendario, modal cliente
1. Cancelar con motivo: Mis apartados y Escrituración piden motivo (modal reutilizado) 2. Origen BROCKER agregado en alta afluencia y captura rápida 3. Etapas oportunidades reordenadas: Agendo Cita → Afluencia → Cotizador 4. Cotizador: mensualidades diferibles (6, 12, 14, 18, 24 meses) 5. Calendario semanal por vendedor en Mi día 6. Hora en citas (datetime-local en vez de solo fecha) 7. Click en nombre → modal DetalleLeadModal (info + notas + historial)
This commit is contained in:
@@ -88,11 +88,22 @@ export function convertirLead(itemId: string): Promise<{ oportunidadId: string }
|
||||
}
|
||||
|
||||
/** POST /apartados/:itemId/estado — botones de fase de "Mis apartados" */
|
||||
export function cambiarEstadoApartado(itemId: string, estado: string): Promise<unknown> {
|
||||
export function cambiarEstadoApartado(
|
||||
itemId: string,
|
||||
estado: string,
|
||||
motivo?: string,
|
||||
subcategoria?: string,
|
||||
comentario?: string,
|
||||
): Promise<unknown> {
|
||||
return fetchJson(`/apartados/${itemId}/estado`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ estado }),
|
||||
body: JSON.stringify({
|
||||
estado,
|
||||
...(motivo !== undefined && motivo !== '' ? { motivo } : {}),
|
||||
...(subcategoria !== undefined && subcategoria !== '' ? { subcategoria } : {}),
|
||||
...(comentario !== undefined && comentario !== '' ? { comentario } : {}),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user