crstiobal fix
This commit is contained in:
parent
bc3aca2aa4
commit
d394de50f9
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"rut": "76415480",
|
||||
"events": [],
|
||||
"cached": true,
|
||||
"timestamp": "2026-05-22T19:21:16.446777",
|
||||
"constitution_date": null
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"rut": "76415480",
|
||||
"events": [],
|
||||
"cached": true,
|
||||
"timestamp": "2026-05-22T19:28:05.250827",
|
||||
"constitution_date": null
|
||||
}
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
{
|
||||
"pathCount": 22,
|
||||
"relationships": [
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2005-12-13",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "10474151",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6345160",
|
||||
"doh_extraction_id": "461832",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6345160",
|
||||
"published_at": "2004-05-22",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2004/05/22/do-20040522.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "11550027",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6345160",
|
||||
"doh_extraction_id": "461832",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6345160",
|
||||
"published_at": "2004-05-22",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2004/05/22/do-20040522.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 26,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 15,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76103603",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 100,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "99516680",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2003-03-28",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-01-25",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76145086",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2011-05-12",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76103603",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-07-07",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76145086",
|
||||
"target": "11550027",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"match_type": "bt",
|
||||
"source": "DOH",
|
||||
"published_at": "2011-02-02",
|
||||
"doh_id": "7208282",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2011/02/02/do-20110202.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "96944720",
|
||||
"target": "10474151",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-01-25",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "96944720",
|
||||
"target": "10474151",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6012540",
|
||||
"doh_extraction_id": "585051",
|
||||
"shares_percent": 40,
|
||||
"source": "DOH",
|
||||
"doh_id": "6012540",
|
||||
"published_at": "2001-06-20",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2001/06/20/do-20010620.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6609682",
|
||||
"doh_extraction_id": "725944",
|
||||
"shares_percent": 26,
|
||||
"source": "DOH",
|
||||
"doh_id": "6609682",
|
||||
"published_at": "2006-09-21",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2006/09/21/do-20060921.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "78595830",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6609682",
|
||||
"doh_extraction_id": "725944",
|
||||
"shares_percent": 26,
|
||||
"source": "DOH",
|
||||
"doh_id": "6609682",
|
||||
"published_at": "2006-09-21",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2006/09/21/do-20060921.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 26,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "11736590",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2009-04-02",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6986535",
|
||||
"doh_extraction_id": "343796",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6986535",
|
||||
"published_at": "2009-03-07",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2009/03/07/do-20090307.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "78595830",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6986535",
|
||||
"doh_extraction_id": "343796",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6986535",
|
||||
"published_at": "2009-03-07",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2009/03/07/do-20090307.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 35,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
}
|
||||
],
|
||||
"entityNames": {
|
||||
"10474151": "ORELIA ANDREA WOOD FLORES",
|
||||
"11550027": "CARLOS ALEJANDRO MUNOZ BAEZ",
|
||||
"11736590": "EDUARDO ANDRES KAFTANSKI ARANCIBIA",
|
||||
"76052565": "LINUXCENTER SOCIEDAD ANONIMA",
|
||||
"76103603": "FORMACION DIGITAL SPA",
|
||||
"76145086": "LINUX LATINAMERICA SOCIEDAD ANONIMA",
|
||||
"76415480": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"76657450": "LINUXCENTER LATINOAMERICA SOCIEDAD ANONIMA",
|
||||
"77699370": "INVERSIONES KACT LIMITADA",
|
||||
"78595830": "INVERSIONES WOOD LIMITADA",
|
||||
"96944720": "CENTRO LINUX S A",
|
||||
"99516680": "GLOBAL TRAINING S A"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": true,
|
||||
"cache_key": "dequienes_cache:dequienes_relationships:44e208e6756fd87de10e4da1c1fb7751b4cc887607ae3cdfd02c58cd53fc99f2",
|
||||
"retrieved_at": "2026-05-22T19:21:16.436841"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
{
|
||||
"pathCount": 22,
|
||||
"relationships": [
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2005-12-13",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "10474151",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6345160",
|
||||
"doh_extraction_id": "461832",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6345160",
|
||||
"published_at": "2004-05-22",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2004/05/22/do-20040522.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76415480",
|
||||
"target": "11550027",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6345160",
|
||||
"doh_extraction_id": "461832",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6345160",
|
||||
"published_at": "2004-05-22",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2004/05/22/do-20040522.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 26,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 15,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76103603",
|
||||
"target": "76415480",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 100,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "99516680",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2003-03-28",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-01-25",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76145086",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2011-05-12",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76103603",
|
||||
"target": "11550027",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-07-07",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76145086",
|
||||
"target": "11550027",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"match_type": "bt",
|
||||
"source": "DOH",
|
||||
"published_at": "2011-02-02",
|
||||
"doh_id": "7208282",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2011/02/02/do-20110202.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "96944720",
|
||||
"target": "10474151",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2010-01-25",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "96944720",
|
||||
"target": "10474151",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6012540",
|
||||
"doh_extraction_id": "585051",
|
||||
"shares_percent": 40,
|
||||
"source": "DOH",
|
||||
"doh_id": "6012540",
|
||||
"published_at": "2001-06-20",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2001/06/20/do-20010620.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6609682",
|
||||
"doh_extraction_id": "725944",
|
||||
"shares_percent": 26,
|
||||
"source": "DOH",
|
||||
"doh_id": "6609682",
|
||||
"published_at": "2006-09-21",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2006/09/21/do-20060921.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "78595830",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6609682",
|
||||
"doh_extraction_id": "725944",
|
||||
"shares_percent": 26,
|
||||
"source": "DOH",
|
||||
"doh_id": "6609682",
|
||||
"published_at": "2006-09-21",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2006/09/21/do-20060921.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76657450",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 26,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "11736590",
|
||||
"label": "REPRESENTED_BY",
|
||||
"information_source": {
|
||||
"started_at": "2009-04-02",
|
||||
"source": "SII_REP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6986535",
|
||||
"doh_extraction_id": "343796",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6986535",
|
||||
"published_at": "2009-03-07",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2009/03/07/do-20090307.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "78595830",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"pub_id": "doh_id_6986535",
|
||||
"doh_extraction_id": "343796",
|
||||
"shares_percent": 50,
|
||||
"source": "DOH",
|
||||
"doh_id": "6986535",
|
||||
"published_at": "2009-03-07",
|
||||
"url": "https://www.diariooficial.interior.gob.cl/media/2009/03/07/do-20090307.pdf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "76052565",
|
||||
"target": "77699370",
|
||||
"label": "OWNED_BY",
|
||||
"information_source": {
|
||||
"shares_percent": 35,
|
||||
"source": "SII_REC_COM"
|
||||
}
|
||||
}
|
||||
],
|
||||
"entityNames": {
|
||||
"10474151": "ORELIA ANDREA WOOD FLORES",
|
||||
"11550027": "CARLOS ALEJANDRO MUNOZ BAEZ",
|
||||
"11736590": "EDUARDO ANDRES KAFTANSKI ARANCIBIA",
|
||||
"76052565": "LINUXCENTER SOCIEDAD ANONIMA",
|
||||
"76103603": "FORMACION DIGITAL SPA",
|
||||
"76145086": "LINUX LATINAMERICA SOCIEDAD ANONIMA",
|
||||
"76415480": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"76657450": "LINUXCENTER LATINOAMERICA SOCIEDAD ANONIMA",
|
||||
"77699370": "INVERSIONES KACT LIMITADA",
|
||||
"78595830": "INVERSIONES WOOD LIMITADA",
|
||||
"96944720": "CENTRO LINUX S A",
|
||||
"99516680": "GLOBAL TRAINING S A"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": true,
|
||||
"cache_key": "dequienes_cache:dequienes_relationships:44e208e6756fd87de10e4da1c1fb7751b4cc887607ae3cdfd02c58cd53fc99f2",
|
||||
"retrieved_at": "2026-05-22T19:28:05.240585"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,820 +0,0 @@
|
|||
{
|
||||
"success": true,
|
||||
"cargarRut": {
|
||||
"success": true,
|
||||
"data": [
|
||||
"76415480-0"
|
||||
]
|
||||
},
|
||||
"resumen": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"rut": "76415480-0",
|
||||
"esPersonaJuridica": true,
|
||||
"fechaCarga": "20-05-2026",
|
||||
"identificacion": {
|
||||
"razonSocial": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"presentaActividades": "SI",
|
||||
"inicioActividades": "13-12-2005",
|
||||
"autorizadoMonedaExtranjera": "NO",
|
||||
"empresaMenor": "SI",
|
||||
"observaciones": "Recomendación GeneralComo recomendación general, siempre que se realicen transacciones comerciales con cualquier contribuyente, el SII aconseja verificar, en las opciones anteriores habilitadas, el timbraje del documento y que la actividad económica esté vigente en las bases de datos del Servicio. Además, se recomienda verificar que el domicilio y la actividad económica consignados en la factura o boleta que reciba, correspondan al vendedor o prestador del servicio ofrecido. Para un mayor resguardo, se recomienda efectuar el pago con cheque nominativo o vale vista a favor del proveedor, anotando al reverso el RUT del emisor y número del documento recibido.",
|
||||
"notas": "Si el contribuyente correspondiente al RUT consultado, no está de acuerdo o desconoce la situación informada en esta consulta, deberá concurrir a la unidad del SII correspondiente a su domicilio para aclarar o resolver su situación.Esta consulta no constituye una certificación del comportamiento tributario del contribuyente. De esta manera, si para un RUT no aparecen observaciones, no significa que en una posterior auditoría no se detecten problemas.",
|
||||
"situacionActual": "No se encuentra en la nómina de difícil fiscalización",
|
||||
"actividadEconomicaVigente": [
|
||||
{
|
||||
"actividades": "VENTA AL POR MENOR DE OTROS PRODUCTOS EN COMERCIOS ESPECIALIZADOS N.C.",
|
||||
"codigo": "477399",
|
||||
"categoria": "Primera",
|
||||
"afectaIva": "Si",
|
||||
"fecha": "24-11-2017"
|
||||
},
|
||||
{
|
||||
"actividades": "ALQUILER DE BIENES INMUEBLES AMOBLADOS O CON EQUIPOS Y MAQUINARIAS",
|
||||
"codigo": "681011",
|
||||
"categoria": "Primera",
|
||||
"afectaIva": "Si",
|
||||
"fecha": "13-12-2005"
|
||||
},
|
||||
{
|
||||
"actividades": "OTRAS ACTIVIDADES DE SERVICIOS DE APOYO A LAS EMPRESAS N.C.P.",
|
||||
"codigo": "829900",
|
||||
"categoria": "Primera",
|
||||
"afectaIva": "Si",
|
||||
"fecha": "24-11-2017"
|
||||
}
|
||||
],
|
||||
"documentosTimbrados": [
|
||||
{
|
||||
"documento": "Factura Electronica",
|
||||
"ultimoAnioTimbrado": "2026"
|
||||
},
|
||||
{
|
||||
"documento": "Factura No Afecta O Exenta Electronica",
|
||||
"ultimoAnioTimbrado": "2022"
|
||||
},
|
||||
{
|
||||
"documento": "Boleta Electronica",
|
||||
"ultimoAnioTimbrado": "2025"
|
||||
},
|
||||
{
|
||||
"documento": "Boleta Exenta Electronica",
|
||||
"ultimoAnioTimbrado": "2025"
|
||||
},
|
||||
{
|
||||
"documento": "Guia Despacho Electronica",
|
||||
"ultimoAnioTimbrado": "2026"
|
||||
},
|
||||
{
|
||||
"documento": "Nota Debito Electronica",
|
||||
"ultimoAnioTimbrado": "2025"
|
||||
},
|
||||
{
|
||||
"documento": "Nota Credito Electronica",
|
||||
"ultimoAnioTimbrado": "2026"
|
||||
},
|
||||
{
|
||||
"documento": "Contabilidad En Hojas Sueltas Con Nro.Un",
|
||||
"ultimoAnioTimbrado": "2018"
|
||||
}
|
||||
],
|
||||
"cantidadActividades": 3,
|
||||
"cantidadDocumentos": 8,
|
||||
"ultimaActualizacion": "20-05-2026 14:30:06",
|
||||
"tamanoEmpresaSii": {
|
||||
"tamanoEmpresa": "Pequeña empresa",
|
||||
"ventasAnuales": "10.000,01 a 25.000,00",
|
||||
"cantidadTrabajadores": 7
|
||||
}
|
||||
},
|
||||
"boletinComercial": {
|
||||
"casosInfocom": 0,
|
||||
"casosBolcom": 1,
|
||||
"MontoInfocom": 0,
|
||||
"MontoBolcom": 4914700,
|
||||
"variacion": {
|
||||
"ultimoPeriodo": "11/2025",
|
||||
"periodoActual": "05/2026",
|
||||
"cambioPorcentual": null,
|
||||
"cambioAbsoluto": 4914700
|
||||
},
|
||||
"ultimaActualizacion": "20-05-2026 14:30:05"
|
||||
},
|
||||
"judicial": {
|
||||
"casosCivilesActivos": 0,
|
||||
"casosCivilesPresentados": 0,
|
||||
"casosCivilesConcluidos": 0,
|
||||
"cobranzaActivos": 0,
|
||||
"cobranzaPresentados": 0,
|
||||
"cobranzaConcluidos": 0,
|
||||
"laboralActivos": 2,
|
||||
"laboralPresentados": 0,
|
||||
"laboralConcluidos": 0,
|
||||
"casosActuales": 2,
|
||||
"casosArchivados": 0,
|
||||
"casosConcluidos": 0,
|
||||
"todosLosCasos": 2,
|
||||
"casosQuiebra": 0,
|
||||
"posturasActivasPresentadas": {
|
||||
"demandado": 2
|
||||
},
|
||||
"ultimaActualizacionCiviles": "20-05-2026 14:30:02",
|
||||
"ultimaActualizacionCobranza": "20-05-2026 14:30:02",
|
||||
"ultimaActualizacionLaboral": "20-05-2026 14:30:03",
|
||||
"boletinConcursal": false
|
||||
},
|
||||
"cobranzaLaboral": {
|
||||
"moraPrevisional": {
|
||||
"casosTotales": 149,
|
||||
"empleados": 4,
|
||||
"variacion": {
|
||||
"ultimoPeriodo": "11/2025",
|
||||
"periodoActual": "05/2026",
|
||||
"cambioPorcentual": 22.13,
|
||||
"cambioAbsoluto": 27
|
||||
},
|
||||
"ultimaActualizacion": "20-05-2026 14:30:15"
|
||||
},
|
||||
"multaLaboral": {
|
||||
"totalMultas": 4,
|
||||
"montoTotalMultas": 1605000,
|
||||
"multasPagadas": 1,
|
||||
"montoMultasPagadas": 335000,
|
||||
"multasPendientes": 3,
|
||||
"montoMultasPendientes": 1270000,
|
||||
"variacion": {
|
||||
"ultimoPeriodo": "11/2025",
|
||||
"periodoActual": "05/2026",
|
||||
"cambioPorcentual": 379.1,
|
||||
"cambioAbsoluto": 1270000
|
||||
},
|
||||
"ultimaActualizacion": "20-05-2026 14:30:03"
|
||||
},
|
||||
"boletinLaboral": {
|
||||
"montoTotal": 615512,
|
||||
"variacion": {
|
||||
"montoTotal": 0,
|
||||
"ultimoPeriodo": "11/2025",
|
||||
"periodoActual": "05/2026",
|
||||
"cambioPorcentual": null,
|
||||
"cambioAbsoluto": 615512
|
||||
},
|
||||
"ultimaActualizacion": "20-05-2026 14:30:04"
|
||||
}
|
||||
},
|
||||
"legal": {},
|
||||
"deudaBancaria": {
|
||||
"periodo": "04/2026",
|
||||
"deudaDirectaComercial": 20900,
|
||||
"deudaDirectaCastigada": 0,
|
||||
"deudaDirectaHipotecaria": 0,
|
||||
"deudaDirectaMorosa": 0,
|
||||
"deudaDirectaVencida": 0,
|
||||
"deudaDirectaVigente": 20900,
|
||||
"deudaIndirectaCastigada": 0,
|
||||
"deudaIndirectaVencida": 0,
|
||||
"deudaIndirectaVigente": 0,
|
||||
"leasingMoroso": 0,
|
||||
"leasingVigente": 0,
|
||||
"lineaCredito": 10,
|
||||
"variacion": {
|
||||
"periodo": "10/2025",
|
||||
"deudaDirectaComercial": 25070,
|
||||
"deudaDirectaCastigada": 0,
|
||||
"deudaDirectaHipotecaria": 0,
|
||||
"deudaDirectaMorosa": 0,
|
||||
"deudaDirectaVencida": 0,
|
||||
"deudaDirectaVigente": 25070,
|
||||
"deudaIndirectaCastigada": 0,
|
||||
"deudaIndirectaVencida": 0,
|
||||
"deudaIndirectaVigente": 0,
|
||||
"leasingMoroso": 0,
|
||||
"leasingVigente": 0,
|
||||
"lineaCredito": 0
|
||||
}
|
||||
},
|
||||
"bienes": {
|
||||
"vehiculos": {
|
||||
"cantidadVehiculos": 0,
|
||||
"tasacionTotal": 0,
|
||||
"ultimaActualizacion": "20-05-2026 14:30:04"
|
||||
},
|
||||
"propiedades": {
|
||||
"cantidadPropiedades": 0,
|
||||
"tasacionTotal": "0",
|
||||
"ultimaActualizacion": "20-05-2026 14:30:04"
|
||||
}
|
||||
},
|
||||
"creditScoring": {
|
||||
"ponderacionFinanciero": 100,
|
||||
"maxPonderacionFinanciero": 100,
|
||||
"ponderacionJudicial": 0,
|
||||
"judicialBankruptcy": false,
|
||||
"maxPonderacionJudicial": 100,
|
||||
"ponderacionCobranzaLaboral": 0,
|
||||
"maxPonderacionCobranzaLaboral": 100,
|
||||
"ponderacionBoletin": 0,
|
||||
"maxPonderacionBoletin": 100,
|
||||
"cantidadAyudantes": 4,
|
||||
"nombresAyudantes": [
|
||||
"judicial",
|
||||
"commertialBulletin",
|
||||
"finances",
|
||||
"laborCollection"
|
||||
],
|
||||
"porcentajeClasificacion": 100,
|
||||
"etiquetaClasificacion": "High"
|
||||
},
|
||||
"ratings": {
|
||||
"etiquetasActivas": [],
|
||||
"cantidadComentarios": 0,
|
||||
"calificacionGlobal": {
|
||||
"valor": 0,
|
||||
"total": 0
|
||||
},
|
||||
"calificacionCumplimientoGlobal": {
|
||||
"valor": 0,
|
||||
"total": 0
|
||||
},
|
||||
"calificacionRelacionGlobal": {
|
||||
"valor": 0,
|
||||
"total": 0
|
||||
},
|
||||
"calificacionTransparenciaGlobal": {
|
||||
"valor": 0,
|
||||
"total": 0
|
||||
},
|
||||
"calificacionFiabilidadGlobal": {
|
||||
"valor": 0,
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
"compliance": {
|
||||
"nombre": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"segundoNombre": "",
|
||||
"apellido": "",
|
||||
"segundoApellido": "",
|
||||
"tipoPersona": "juridical",
|
||||
"riesgo": "free",
|
||||
"resumen": {
|
||||
"pepChile": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"pepChileFamiliares": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"funcionariosPublicos": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"listasInternacionales": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"penal": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"mallaSocietaria": {
|
||||
"totalResultados": 1,
|
||||
"riesgo": "free"
|
||||
},
|
||||
"noticias": {
|
||||
"totalResultados": 0,
|
||||
"riesgo": "free"
|
||||
}
|
||||
}
|
||||
},
|
||||
"incluyeEquifax": false,
|
||||
"ayudantesFallidos": []
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:905242db38143ec3533579000b3e47fbb145291386a03cb4d63395e7e0c02dfe",
|
||||
"cached_at": "2026-05-22T19:28:00.725555"
|
||||
}
|
||||
},
|
||||
"judicial": {
|
||||
"civil": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"page": 1,
|
||||
"totalPages": 0,
|
||||
"cantidad": 0,
|
||||
"casos": [],
|
||||
"ultimaActualizacion": "20-05-2026 14:30:03"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:2f1467a0e28de6efa96b80d2254b4f3e11e9b4224efe46b3e0096c362eb166c3",
|
||||
"cached_at": "2026-05-22T19:28:01.174560"
|
||||
}
|
||||
},
|
||||
"cobranza": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"page": 1,
|
||||
"totalPages": 0,
|
||||
"cantidad": 0,
|
||||
"casos": [],
|
||||
"ultimaActualizacion": "20-05-2026 14:30:03"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:0d2568ab46f5249f0c512f1e77cbf07a1ebc896073fd6e31002566c644315c17",
|
||||
"cached_at": "2026-05-22T19:28:01.658467"
|
||||
}
|
||||
},
|
||||
"laboral": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"page": 1,
|
||||
"totalPages": 1,
|
||||
"cantidad": 2,
|
||||
"casos": [
|
||||
{
|
||||
"estado": "Tramitación",
|
||||
"estadoCausa": "Sin archivar",
|
||||
"etapa": "Audiencia Preparatoria",
|
||||
"fechaIngreso": "22-01-2026 21:00:00",
|
||||
"litigantes": [
|
||||
{
|
||||
"rut": "27677870-6",
|
||||
"nombre": "ANABEL CHIQUINQUIRA BELLO RIOS",
|
||||
"sujeto": "DTE.",
|
||||
"persona": "NATURAL",
|
||||
"abogadoDefensor": null
|
||||
},
|
||||
{
|
||||
"rut": "76415480-0",
|
||||
"nombre": "INVERSIONES WOOD LTDA",
|
||||
"sujeto": "DDO.",
|
||||
"persona": "JURIDICA",
|
||||
"abogadoDefensor": null
|
||||
},
|
||||
{
|
||||
"rut": "20052516-7",
|
||||
"nombre": "DANIEL BASTIÁN PATRICIO VILLAGRÁN CARMONA (Poder Amplio)",
|
||||
"sujeto": "AB.DTE",
|
||||
"persona": "NATURAL",
|
||||
"abogadoDefensor": null
|
||||
}
|
||||
],
|
||||
"materia": "Ordinario",
|
||||
"rit": "O-564-2026",
|
||||
"tribunal": "1º Juzgado de Letras del Trabajo de Santiago",
|
||||
"sujeto": "DDO.",
|
||||
"estadoActual": "Vigente"
|
||||
},
|
||||
{
|
||||
"estado": "Tramitación",
|
||||
"estadoCausa": "Sin archivar",
|
||||
"etapa": "Impugnación Monitorio",
|
||||
"fechaIngreso": "20-01-2026 21:00:00",
|
||||
"litigantes": [
|
||||
{
|
||||
"rut": "20052516-7",
|
||||
"nombre": "DANIEL BASTIÁN PATRICIO VILLAGRÁN CARMONA (Poder Amplio)",
|
||||
"sujeto": "AB.DTE",
|
||||
"persona": "NATURAL",
|
||||
"abogadoDefensor": null
|
||||
},
|
||||
{
|
||||
"rut": "27112648-4",
|
||||
"nombre": "LIDIA KARINA MARTINEZ LLOVERA",
|
||||
"sujeto": "DTE.",
|
||||
"persona": "NATURAL",
|
||||
"abogadoDefensor": null
|
||||
},
|
||||
{
|
||||
"rut": "76415480-0",
|
||||
"nombre": "INVERSIONES WOOD LTDA",
|
||||
"sujeto": "DDO.",
|
||||
"persona": "JURIDICA",
|
||||
"abogadoDefensor": null
|
||||
}
|
||||
],
|
||||
"materia": "Monitorio",
|
||||
"rit": "M-370-2026",
|
||||
"tribunal": "2º Juzgado de Letras del Trabajo de Santiago",
|
||||
"sujeto": "DDO.",
|
||||
"estadoActual": "Vigente"
|
||||
}
|
||||
],
|
||||
"ultimaActualizacion": "20-05-2026 14:30:03"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:bfd6620c08be2e05f05d20a0e99ab40092ee1d047835fc35965c382781fc5fcc",
|
||||
"cached_at": "2026-05-22T19:28:02.139101"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cobranzaLaboral": {
|
||||
"multaLaboral": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"page": 1,
|
||||
"totalPages": 1,
|
||||
"cantidad": 4,
|
||||
"casos": [
|
||||
{
|
||||
"enunciado": "No comparecer a citación de la Dirección del Trabajo.",
|
||||
"estado": "EN TRÁMITE DE COBRANZA",
|
||||
"fecha": "20-03-2026 21:00:00",
|
||||
"multa": "4282/26/011-1",
|
||||
"procedencia": "RECLAMO",
|
||||
"um": "0.67",
|
||||
"tipoUm": "IMM",
|
||||
"montoClp": 335000
|
||||
},
|
||||
{
|
||||
"enunciado": "No comparecer a citación de la Dirección del Trabajo.",
|
||||
"estado": "EN TRÁMITE DE COBRANZA",
|
||||
"fecha": "04-02-2026 21:00:00",
|
||||
"multa": "8566/25/345-1",
|
||||
"procedencia": "RECLAMO",
|
||||
"um": "0.67",
|
||||
"tipoUm": "IMM",
|
||||
"montoClp": 335000
|
||||
},
|
||||
{
|
||||
"enunciado": "No exhibir toda la documentación necesaria para efectuar la conciliación",
|
||||
"estado": "EN TRÁMITE DE COBRANZA",
|
||||
"fecha": "04-02-2026 21:00:00",
|
||||
"multa": "8566/25/345-2",
|
||||
"procedencia": "RECLAMO",
|
||||
"um": "1.2",
|
||||
"tipoUm": "IMM",
|
||||
"montoClp": 600000
|
||||
},
|
||||
{
|
||||
"enunciado": "No comparecer a citación de la Dirección del Trabajo.",
|
||||
"estado": "PAGADA",
|
||||
"fecha": "23-02-2024 21:00:00",
|
||||
"multa": "1728/23/223-1",
|
||||
"procedencia": "RECLAMO",
|
||||
"um": "0.67",
|
||||
"tipoUm": "IMM",
|
||||
"montoClp": 335000
|
||||
}
|
||||
],
|
||||
"ultimaActualizacion": "20-05-2026 14:30:02"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:fcb2a117c7fd7381cadf1ab75d36b3391f12a2f42e7eee34af44b56e129faa25",
|
||||
"cached_at": "2026-05-22T19:28:02.749770"
|
||||
}
|
||||
},
|
||||
"moraPrevisional": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"page": 1,
|
||||
"totalPages": 8,
|
||||
"cantidad": 152,
|
||||
"casos": [
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "29-04-2026 20:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "02/2026",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-03-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "01/2026",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Capital",
|
||||
"fecha": "30-03-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "01/2026",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Uno",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Capital",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Modelo",
|
||||
"fecha": "27-02-2026 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "12/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Capital",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Modelo",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Uno",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-01-2026 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "11/2025",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-12-2025 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "10/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Uno",
|
||||
"fecha": "30-12-2025 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "ANABEL CHIQUINQUIRA BELLO RIOS ",
|
||||
"periodo": "10/2025",
|
||||
"rutAfiliado": "27677870-6",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "Administradora de Fondos de Cesantía, AFC",
|
||||
"fecha": "30-12-2025 21:00:00",
|
||||
"fechaDemanda": "Prejudicial",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "10/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Seguro de Cesantía"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Modelo",
|
||||
"fecha": "30-12-2025 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "LIDIA KARINA MARTINEZ LLOVERA ",
|
||||
"periodo": "10/2025",
|
||||
"rutAfiliado": "27112648-4",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
},
|
||||
{
|
||||
"afp": "AFP Capital",
|
||||
"fecha": "30-12-2025 21:00:00",
|
||||
"fechaDemanda": "En proceso de Interposición de demanda",
|
||||
"nombreAfiliado": "CARLOS ALEJANDRO MUNOZ BAEZ ",
|
||||
"periodo": "10/2025",
|
||||
"rutAfiliado": "11550027-9",
|
||||
"tipoProducto": "Cotización obligatorias"
|
||||
}
|
||||
],
|
||||
"ultimaActualizacion": "20-05-2026 14:30:02"
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:29103e062b8d43f3ced521ba71f4dc1082d6054a9a09aacdefba1c4cd57c208a",
|
||||
"cached_at": "2026-05-22T19:28:03.229857"
|
||||
}
|
||||
}
|
||||
},
|
||||
"compliance": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"rut": "76415480-0",
|
||||
"tipoPersona": "juridical",
|
||||
"nombre": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"riesgo": "free",
|
||||
"sociedades": {
|
||||
"coincidencias": [
|
||||
{
|
||||
"nombreSociedad": "INVERSIONES WOOD Y COMPANIA LIMITADA",
|
||||
"rutSociedad": "76415480-0",
|
||||
"nombreSocio": null,
|
||||
"rutSocio": null,
|
||||
"fecha": null,
|
||||
"socios": [],
|
||||
"extractos": [],
|
||||
"participaciones": [
|
||||
{
|
||||
"razonSocial": "FORMACION DIGITAL SPA",
|
||||
"rut": "76103603-3",
|
||||
"tipoDeParticipacion": "Socio"
|
||||
},
|
||||
{
|
||||
"razonSocial": "LINUXCENTER LATINOAMERICA SOCIEDAD ANONIMA",
|
||||
"rut": "76657450-5",
|
||||
"tipoDeParticipacion": "Socio"
|
||||
},
|
||||
{
|
||||
"razonSocial": "LINUXCENTER SOCIEDAD ANONIMA",
|
||||
"rut": "76052565-0",
|
||||
"tipoDeParticipacion": "Socio"
|
||||
},
|
||||
{
|
||||
"razonSocial": "LINUX LATINAMERICA SOCIEDAD ANONIMA",
|
||||
"rut": "76145086-7",
|
||||
"tipoDeParticipacion": "Socio"
|
||||
}
|
||||
],
|
||||
"fuente": null
|
||||
}
|
||||
],
|
||||
"totalCoincidencias": 1
|
||||
},
|
||||
"listasInternacionales": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
},
|
||||
"penal": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
},
|
||||
"noticias": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
},
|
||||
"pepChile": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
},
|
||||
"familiaresPep": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
},
|
||||
"funcionariosPublicos": {
|
||||
"coincidencias": [],
|
||||
"totalCoincidencias": 0
|
||||
}
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:277735490089a998797d3e64e5706e8723087e6b1a0b16684916ed4dc69310c8",
|
||||
"cached_at": "2026-05-22T19:28:03.930966"
|
||||
}
|
||||
},
|
||||
"legal": {
|
||||
"mallaSocietaria": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"rut": "76415480-0",
|
||||
"empresaEnUnDia": [],
|
||||
"diarioOficial": [],
|
||||
"participaciones": [
|
||||
{
|
||||
"rut": "0766574505",
|
||||
"society": "LINUXCENTER LATINOAMERICA SOCIEDAD ANONIMA"
|
||||
},
|
||||
{
|
||||
"rut": "0760525650",
|
||||
"society": "LINUXCENTER SOCIEDAD ANONIMA"
|
||||
},
|
||||
{
|
||||
"rut": "0761450867",
|
||||
"society": "LINUX LATINAMERICA SOCIEDAD ANONIMA"
|
||||
},
|
||||
{
|
||||
"rut": "0761036033",
|
||||
"society": "FORMACION DIGITAL SPA"
|
||||
}
|
||||
]
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:e501a401d1232075ba99f75666a87a548a09c121c0c86e4998c2c91525d2d052",
|
||||
"cached_at": "2026-05-22T19:28:04.437179"
|
||||
}
|
||||
}
|
||||
},
|
||||
"creditScore": {
|
||||
"success": true,
|
||||
"data": {
|
||||
"periodo": "2026-05",
|
||||
"inicioActividades": true,
|
||||
"porcentajeFinanzas": 0,
|
||||
"numeradorFinanzas": 0,
|
||||
"denominadorFinanzas": 20900,
|
||||
"ponderacionFinanzas": 100,
|
||||
"porcentajeJudicial": 100,
|
||||
"numeradorJudicial": 2,
|
||||
"denominadorJudicial": 2,
|
||||
"quiebraJudicial": false,
|
||||
"ponderacionJudicial": 0,
|
||||
"porcentajeMoraPrevisional": 0,
|
||||
"casosMoraPrevisional": 144,
|
||||
"porcentajeMultasLaborales": 79.12772585669782,
|
||||
"montoMultasLaborales": 1605000,
|
||||
"porcentajeBoletinLaboral": 100,
|
||||
"montoBoletinLaboral": 615512,
|
||||
"ponderacionCobranzaLaboral": 0,
|
||||
"porcentajeBoletinComercial": 100,
|
||||
"montoBoletinComercial": 4914700,
|
||||
"ponderacionBoletinComercial": 0,
|
||||
"cantidadHelpers": "4",
|
||||
"porcentajeClasificacion": 100,
|
||||
"etiquetaClasificacion": "High",
|
||||
"nombresHelpers": [
|
||||
"judicial",
|
||||
"commertialBulletin",
|
||||
"finances",
|
||||
"laborCollection"
|
||||
],
|
||||
"maxPonderacionJudicial": 100,
|
||||
"maxPonderacionBoletinComercial": 100,
|
||||
"maxPonderacionCobranzaLaboral": 100
|
||||
},
|
||||
"_cache_info": {
|
||||
"cached": false,
|
||||
"cache_key": "sheriff_v2_cache:sheriff_v2_get:8169039cf1dc5a9883879d5acdfd0a2bf1eab0a1dabd62dd34c6e86c16e6ec62",
|
||||
"cached_at": "2026-05-22T19:28:05.200921"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -62,18 +62,18 @@ const BulkEvaluationProgressMeter: React.FC = () => {
|
|||
|
||||
if (!processingEvaluation) {
|
||||
return (
|
||||
<div className="bg-gray-800 rounded-lg shadow p-6">
|
||||
<h3 className="text-lg font-semibold text-gray-100 mb-4">{t('bulkProgress.title')}</h3>
|
||||
<div className=" rounded-lg shadow p-6">
|
||||
<h3 className="text-lg font-semibold text-gray-900 dark:text-white">{t('bulkProgress.title')}</h3>
|
||||
<div className="space-y-4">
|
||||
<div className="relative pt-1">
|
||||
<div className="flex mb-2 items-center justify-between">
|
||||
<div>
|
||||
<span className="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-blue-200 bg-blue-900">
|
||||
<span className="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-blue-100 bg-blue-500 ">
|
||||
{t('bulkProgress.progress')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<span className="text-xs font-semibold inline-block text-blue-200">
|
||||
<span className="text-sm text-gray-500 dark:text-gray-400">
|
||||
0%
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -84,7 +84,7 @@ const BulkEvaluationProgressMeter: React.FC = () => {
|
|||
className="h-4 rounded-full bg-blue-500"
|
||||
></div>
|
||||
</div>
|
||||
<div className="text-sm text-gray-300">
|
||||
<div className="text-sm text-gray-500 dark:text-gray-400">
|
||||
{t('bulkProgress.completed', { completed: 0, total: 0 })}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,249 +0,0 @@
|
|||
import React, { useMemo, useState } from 'react';
|
||||
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar, AreaChart, Area } from 'recharts';
|
||||
import { ChartBarIcon, ChartBarSquareIcon, PresentationChartLineIcon } from '@heroicons/react/24/outline';
|
||||
import { IResult as IResultBackend } from '../../../server/src/models/Result';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface IResult extends Omit<IResultBackend, 'rut'> {
|
||||
_id: string;
|
||||
createdAt: string;
|
||||
rut?: string;
|
||||
}
|
||||
|
||||
interface ConsultationHistoryChartProps {
|
||||
results: IResult[];
|
||||
}
|
||||
|
||||
interface ChartData {
|
||||
date: string;
|
||||
count: number;
|
||||
displayDate: string;
|
||||
}
|
||||
|
||||
type ChartType = 'bar' | 'line' | 'area';
|
||||
|
||||
const ConsultationHistoryChart: React.FC<ConsultationHistoryChartProps> = ({ results }) => {
|
||||
const { t, i18n } = useTranslation();
|
||||
const [chartType, setChartType] = useState<ChartType>('bar');
|
||||
const chartData = useMemo(() => {
|
||||
// Group results by date
|
||||
const dateGroups: { [key: string]: number } = {};
|
||||
|
||||
results.forEach(result => {
|
||||
const date = new Date(result.createdAt);
|
||||
const dateKey = date.toISOString().split('T')[0]; // YYYY-MM-DD format
|
||||
dateGroups[dateKey] = (dateGroups[dateKey] || 0) + 1;
|
||||
});
|
||||
|
||||
// Convert to array and sort by date
|
||||
const data: ChartData[] = Object.entries(dateGroups)
|
||||
.map(([date, count]) => {
|
||||
const resolvedLangKey = (i18n.resolvedLanguage ?? i18n.language ?? 'es');
|
||||
const localeMap: Record<string, string> = { es: 'es-ES', en: 'en-US', pt: 'pt-PT', fr: 'fr-FR' };
|
||||
const dateLocale = localeMap[resolvedLangKey] ?? 'es-ES';
|
||||
return {
|
||||
date,
|
||||
count,
|
||||
displayDate: new Date(date).toLocaleDateString(dateLocale, {
|
||||
day: '2-digit',
|
||||
month: '2-digit'
|
||||
})
|
||||
};
|
||||
})
|
||||
.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime())
|
||||
.slice(-30); // Show last 30 days
|
||||
|
||||
return data;
|
||||
}, [results, i18n.resolvedLanguage, i18n.language]);
|
||||
|
||||
const totalConsultations = results.length;
|
||||
const averagePerDay = chartData.length > 0 ? (totalConsultations / chartData.length).toFixed(1) : '0';
|
||||
const maxInDay = Math.max(...chartData.map(d => d.count), 0);
|
||||
|
||||
return (
|
||||
<div className="bg-white dark:bg-gray-800 shadow-lg rounded-xl border border-gray-200 dark:border-gray-700">
|
||||
<div className="px-6 py-6 sm:p-8">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
|
||||
<div className="flex items-center space-x-3 mb-4 sm:mb-0">
|
||||
<div className="p-2 bg-blue-100 dark:bg-blue-900/50 rounded-lg">
|
||||
<ChartBarIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-xl font-semibold text-gray-900 dark:text-white">{t('consultationChart.title')}</h3>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">{t('consultationChart.subtitle')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Chart Type Selector */}
|
||||
<div className="flex items-center space-x-2">
|
||||
<span className="text-sm font-medium text-gray-700 dark:text-gray-300">{t('consultationChart.chartType')}:</span>
|
||||
<div className="flex rounded-lg border border-gray-300 dark:border-gray-600 overflow-hidden">
|
||||
<button
|
||||
onClick={() => setChartType('bar')}
|
||||
className={`px-3 py-2 text-sm font-medium transition-colors ${
|
||||
chartType === 'bar'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700'
|
||||
}`}
|
||||
title={t('consultationChart.barChart')}
|
||||
>
|
||||
<ChartBarIcon className="h-4 w-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setChartType('line')}
|
||||
className={`px-3 py-2 text-sm font-medium transition-colors border-l border-gray-300 dark:border-gray-600 ${
|
||||
chartType === 'line'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700'
|
||||
}`}
|
||||
title={t('consultationChart.lineChart')}
|
||||
>
|
||||
<PresentationChartLineIcon className="h-4 w-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setChartType('area')}
|
||||
className={`px-3 py-2 text-sm font-medium transition-colors border-l border-gray-300 dark:border-gray-600 ${
|
||||
chartType === 'area'
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700'
|
||||
}`}
|
||||
title={t('consultationChart.areaChart')}
|
||||
>
|
||||
<ChartBarSquareIcon className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Statistics Cards */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
||||
<div className="bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg">
|
||||
<div className="text-2xl font-bold text-blue-600 dark:text-blue-400">{totalConsultations}</div>
|
||||
<div className="text-sm text-blue-600 dark:text-blue-400">{t('consultationChart.cards.totalConsultas')}</div>
|
||||
</div>
|
||||
<div className="bg-green-50 dark:bg-green-900/20 p-4 rounded-lg">
|
||||
<div className="text-2xl font-bold text-green-600 dark:text-green-400">{averagePerDay}</div>
|
||||
<div className="text-sm text-green-600 dark:text-green-400">{t('consultationChart.cards.averagePerDay')}</div>
|
||||
</div>
|
||||
<div className="bg-purple-50 dark:bg-purple-900/20 p-4 rounded-lg">
|
||||
<div className="text-2xl font-bold text-purple-600 dark:text-purple-400">{maxInDay}</div>
|
||||
<div className="text-sm text-purple-600 dark:text-purple-400">{t('consultationChart.cards.maxInDay')}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Chart */}
|
||||
{chartData.length > 0 ? (
|
||||
<div className="h-80">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
{chartType === 'bar' ? (
|
||||
<BarChart data={chartData} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
|
||||
<CartesianGrid strokeDasharray="3 3" className="opacity-30" />
|
||||
<XAxis
|
||||
dataKey="displayDate"
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<YAxis
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<Tooltip
|
||||
contentStyle={{
|
||||
backgroundColor: 'rgb(31 41 55)',
|
||||
border: 'none',
|
||||
borderRadius: '8px',
|
||||
color: 'white'
|
||||
}}
|
||||
labelFormatter={(label) => `${t('consultationChart.tooltip.date')}: ${label}`}
|
||||
formatter={(value: number) => [value, t('consultationChart.tooltip.consultas')]}
|
||||
/>
|
||||
<Bar
|
||||
dataKey="count"
|
||||
fill="#3B82F6"
|
||||
radius={[4, 4, 0, 0]}
|
||||
className="hover:opacity-80 transition-opacity"
|
||||
/>
|
||||
</BarChart>
|
||||
) : chartType === 'line' ? (
|
||||
<LineChart data={chartData} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
|
||||
<CartesianGrid strokeDasharray="3 3" className="opacity-30" />
|
||||
<XAxis
|
||||
dataKey="displayDate"
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<YAxis
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<Tooltip
|
||||
contentStyle={{
|
||||
backgroundColor: 'rgb(31 41 55)',
|
||||
border: 'none',
|
||||
borderRadius: '8px',
|
||||
color: 'white'
|
||||
}}
|
||||
labelFormatter={(label) => `${t('consultationChart.tooltip.date')}: ${label}`}
|
||||
formatter={(value: number) => [value, t('consultationChart.tooltip.consultas')]}
|
||||
/>
|
||||
<Line
|
||||
type="monotone"
|
||||
dataKey="count"
|
||||
stroke="#3B82F6"
|
||||
strokeWidth={3}
|
||||
dot={{ fill: '#3B82F6', strokeWidth: 2, r: 4 }}
|
||||
activeDot={{ r: 6, stroke: '#3B82F6', strokeWidth: 2, fill: '#ffffff' }}
|
||||
/>
|
||||
</LineChart>
|
||||
) : (
|
||||
<AreaChart data={chartData} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
|
||||
<defs>
|
||||
<linearGradient id="colorGradient" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="#3B82F6" stopOpacity={0.8}/>
|
||||
<stop offset="95%" stopColor="#3B82F6" stopOpacity={0.1}/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<CartesianGrid strokeDasharray="3 3" className="opacity-30" />
|
||||
<XAxis
|
||||
dataKey="displayDate"
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<YAxis
|
||||
tick={{ fontSize: 12 }}
|
||||
className="text-gray-600 dark:text-gray-400"
|
||||
/>
|
||||
<Tooltip
|
||||
contentStyle={{
|
||||
backgroundColor: 'rgb(31 41 55)',
|
||||
border: 'none',
|
||||
borderRadius: '8px',
|
||||
color: 'white'
|
||||
}}
|
||||
labelFormatter={(label) => `${t('consultationChart.tooltip.date')}: ${label}`}
|
||||
formatter={(value: number) => [value, t('consultationChart.tooltip.consultas')]}
|
||||
/>
|
||||
<Area
|
||||
type="monotone"
|
||||
dataKey="count"
|
||||
stroke="#3B82F6"
|
||||
strokeWidth={2}
|
||||
fill="url(#colorGradient)"
|
||||
/>
|
||||
</AreaChart>
|
||||
)}
|
||||
</ResponsiveContainer>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col items-center justify-center py-16 text-gray-500 dark:text-gray-400">
|
||||
<ChartBarIcon className="h-12 w-12 mb-4 opacity-50" />
|
||||
<p className="text-lg font-medium">{t('consultationChart.empty.title')}</p>
|
||||
<p className="text-sm">{t('consultationChart.empty.subtitle')}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConsultationHistoryChart;
|
||||
|
|
@ -1,316 +0,0 @@
|
|||
import React, { useState } from 'react';
|
||||
import { IResult as IResultBackend } from '../../../server/src/models/Result';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { MagnifyingGlassIcon, ArrowUpIcon, ArrowDownIcon, EyeIcon, CalendarIcon, BuildingOfficeIcon } from '@heroicons/react/24/outline';
|
||||
import { logger } from '../../utils/logger';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface IResult extends IResultBackend {
|
||||
_id: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
interface ResultsTableProps {
|
||||
results: IResult[];
|
||||
currentPage: number;
|
||||
totalPages: number;
|
||||
onPageChange: (page: number) => void;
|
||||
sortField?: string;
|
||||
sortDirection?: 'asc' | 'desc';
|
||||
onSort?: (field: string) => void;
|
||||
}
|
||||
|
||||
const ResultsTable: React.FC<ResultsTableProps> = ({
|
||||
results,
|
||||
currentPage,
|
||||
totalPages,
|
||||
onPageChange,
|
||||
sortField = 'createdAt',
|
||||
sortDirection = 'desc',
|
||||
onSort
|
||||
}) => {
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const { t, i18n } = useTranslation();
|
||||
const localeMap: Record<string, string> = { es: 'es-ES', en: 'en-US', pt: 'pt-PT', fr: 'fr-FR' };
|
||||
// Safely resolve language key; i18n.resolvedLanguage can be undefined
|
||||
const resolvedLangKey = (i18n.resolvedLanguage ?? i18n.language ?? 'es');
|
||||
const dateLocale = localeMap[resolvedLangKey] ?? 'es-ES';
|
||||
|
||||
const filteredResults = results.filter(result => {
|
||||
if (result.isPep) return false;
|
||||
const hasRiskSummary = !!result.riskAssessment?.riskSummary?.semaphore;
|
||||
if (!hasRiskSummary) return false;
|
||||
const searchLower = searchTerm.toLowerCase();
|
||||
const rut = (result.rut || result.details?.rut || '').toLowerCase();
|
||||
const razonSocial = (result.details?.razonSocial || '').toLowerCase();
|
||||
return rut.includes(searchLower) || razonSocial.includes(searchLower);
|
||||
});
|
||||
const getRiskLevelClass = (riskLevel: string) => {
|
||||
switch (riskLevel) {
|
||||
case 'red':
|
||||
return 'bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-300 border border-red-200 dark:border-red-800';
|
||||
case 'yellow':
|
||||
return 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-300 border border-yellow-200 dark:border-yellow-800';
|
||||
case 'green':
|
||||
return 'bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-300 border border-green-200 dark:border-green-800';
|
||||
case 'orange':
|
||||
return 'bg-orange-100 text-orange-800 dark:bg-orange-900/50 dark:text-orange-300 border border-orange-200 dark:border-orange-800';
|
||||
default:
|
||||
return 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300 border border-gray-200 dark:border-gray-600';
|
||||
}
|
||||
};
|
||||
|
||||
const getRiskLevelDisplayName = (riskLevel: string) => {
|
||||
logger.log(33,"riskLevel",riskLevel);
|
||||
switch (riskLevel) {
|
||||
case 'red':
|
||||
return t('risk.critical');
|
||||
case 'yellow':
|
||||
return t('risk.medium');
|
||||
case 'green':
|
||||
return t('risk.low');
|
||||
case 'orange':
|
||||
return t('risk.high');
|
||||
default:
|
||||
return riskLevel;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="bg-white dark:bg-gray-800 shadow-lg rounded-xl border border-gray-200 dark:border-gray-700">
|
||||
<div className="px-6 py-6 sm:p-8">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
|
||||
<div className="flex items-center space-x-3 mb-4 sm:mb-0">
|
||||
<div className="p-2 bg-primary-100 dark:bg-primary-900/50 rounded-lg">
|
||||
<CalendarIcon className="h-6 w-6 text-primary-600 dark:text-primary-400" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-xl font-semibold text-gray-900 dark:text-white">{t('dashboard.recentQueriesTitle', { defaultValue: 'Consultas Recientes' })}</h3>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">{t('dashboard.recentQueriesSubtitle', { defaultValue: 'Historial de evaluaciones realizadas' })}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="relative">
|
||||
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<MagnifyingGlassIcon className="h-5 w-5 text-gray-400" />
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
placeholder={t('consultas.searchPlaceholder')}
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
className="block w-full pl-10 pr-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent sm:text-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{filteredResults.length > 0 ? (
|
||||
<>
|
||||
<div className="overflow-hidden">
|
||||
<div className="overflow-x-auto">
|
||||
<table className="min-w-full divide-y divide-gray-200 dark:divide-gray-600">
|
||||
<thead className="bg-gray-50 dark:bg-gray-700/50">
|
||||
<tr>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<button
|
||||
onClick={() => onSort?.('rut')}
|
||||
className="flex items-center space-x-1 hover:text-gray-900 dark:hover:text-white transition-colors"
|
||||
>
|
||||
<span>RUT</span>
|
||||
{sortField === 'rut' && (
|
||||
sortDirection === 'asc' ?
|
||||
<ArrowUpIcon className="h-4 w-4" /> :
|
||||
<ArrowDownIcon className="h-4 w-4" />
|
||||
)}
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<button
|
||||
onClick={() => onSort?.('razonSocial')}
|
||||
className="flex items-center space-x-1 hover:text-gray-900 dark:hover:text-white transition-colors"
|
||||
>
|
||||
<BuildingOfficeIcon className="h-4 w-4" />
|
||||
<span>{t('consultas.razonSocial')}</span>
|
||||
{sortField === 'razonSocial' && (
|
||||
sortDirection === 'asc' ?
|
||||
<ArrowUpIcon className="h-4 w-4" /> :
|
||||
<ArrowDownIcon className="h-4 w-4" />
|
||||
)}
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<button
|
||||
onClick={() => onSort?.('riskLevel')}
|
||||
className="flex items-center space-x-1 hover:text-gray-900 dark:hover:text-white transition-colors"
|
||||
>
|
||||
<span>{t('consultas.nivelRiesgo')}</span>
|
||||
{sortField === 'riskLevel' && (
|
||||
sortDirection === 'asc' ?
|
||||
<ArrowUpIcon className="h-4 w-4" /> :
|
||||
<ArrowDownIcon className="h-4 w-4" />
|
||||
)}
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<button
|
||||
onClick={() => onSort?.('createdAt')}
|
||||
className="flex items-center space-x-1 hover:text-gray-900 dark:hover:text-white transition-colors"
|
||||
>
|
||||
<CalendarIcon className="h-4 w-4" />
|
||||
<span>{t('consultas.fechaConsulta')}</span>
|
||||
{sortField === 'createdAt' && (
|
||||
sortDirection === 'asc' ?
|
||||
<ArrowUpIcon className="h-4 w-4" /> :
|
||||
<ArrowDownIcon className="h-4 w-4" />
|
||||
)}
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
{t('consultas.acciones')}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
{filteredResults.map((result) => (
|
||||
<tr key={result._id} className="hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors">
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium text-gray-900 dark:text-white">
|
||||
{result.rut || result.details?.rut}
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-gray-900 dark:text-white">
|
||||
<div className="flex items-center">
|
||||
<BuildingOfficeIcon className="h-4 w-4 text-gray-400 mr-2 flex-shrink-0" />
|
||||
<span className="truncate">{result.details?.razonSocial}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm">
|
||||
<span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${getRiskLevelClass(result.riskAssessment?.riskSummary?.semaphore || 'unknown')}`}>
|
||||
{getRiskLevelDisplayName(result.riskAssessment?.riskSummary?.semaphore || t('common.notAvailable'))}
|
||||
</span>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
<div className="flex items-center">
|
||||
<CalendarIcon className="h-4 w-4 text-gray-400 mr-2" />
|
||||
{new Date(result.createdAt).toLocaleDateString(dateLocale)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium">
|
||||
<Link
|
||||
to={`/consultas/${result._id}`}
|
||||
className="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-md text-primary-700 bg-primary-100 hover:bg-primary-200 dark:text-primary-400 dark:bg-primary-900/50 dark:hover:bg-primary-900/70 transition-colors"
|
||||
>
|
||||
<EyeIcon className="h-4 w-4 mr-1" />
|
||||
{t('consultas.viewDetail', { defaultValue: 'Ver Detalle' })}
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-between border-t border-gray-200 bg-gray-50 dark:bg-gray-700/50 px-6 py-4">
|
||||
<div className="flex flex-1 justify-between sm:hidden">
|
||||
<button
|
||||
onClick={() => onPageChange(currentPage - 1)}
|
||||
disabled={currentPage === 1}
|
||||
className="relative inline-flex items-center rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
{t('common.previous')}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onPageChange(currentPage + 1)}
|
||||
disabled={currentPage === totalPages}
|
||||
className="relative ml-3 inline-flex items-center rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
{t('common.next')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<p className="text-sm text-gray-700 dark:text-gray-400">
|
||||
{t('common.page')} <span className="font-semibold text-gray-900 dark:text-white">{currentPage}</span> {t('common.of')}{' '}
|
||||
<span className="font-semibold text-gray-900 dark:text-white">{totalPages}</span>
|
||||
{searchTerm && (
|
||||
<span className="ml-2 text-xs text-gray-500 dark:text-gray-400">
|
||||
({t('common.filteredBy')}: "{searchTerm}")
|
||||
</span>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<nav className="isolate inline-flex -space-x-px rounded-lg shadow-sm" aria-label="Pagination">
|
||||
<button
|
||||
onClick={() => onPageChange(currentPage - 1)}
|
||||
disabled={currentPage === 1}
|
||||
className="relative inline-flex items-center rounded-l-lg px-3 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 dark:ring-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
<span className="sr-only">{t('common.previous')}</span>
|
||||
<ArrowUpIcon className="h-4 w-4 rotate-[-90deg]" />
|
||||
</button>
|
||||
{Array.from({ length: Math.min(totalPages, 5) }, (_, i) => {
|
||||
let page;
|
||||
if (totalPages <= 5) {
|
||||
page = i + 1;
|
||||
} else if (currentPage <= 3) {
|
||||
page = i + 1;
|
||||
} else if (currentPage >= totalPages - 2) {
|
||||
page = totalPages - 4 + i;
|
||||
} else {
|
||||
page = currentPage - 2 + i;
|
||||
}
|
||||
return (
|
||||
<button
|
||||
key={page}
|
||||
onClick={() => onPageChange(page)}
|
||||
aria-current={page === currentPage ? 'page' : undefined}
|
||||
className={`relative inline-flex items-center px-4 py-2 text-sm font-semibold transition-colors ${
|
||||
page === currentPage
|
||||
? 'z-10 bg-primary-600 text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:bg-primary-500'
|
||||
: 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 dark:text-white dark:ring-gray-600 dark:hover:bg-gray-700'
|
||||
}`}
|
||||
>
|
||||
{page}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
<button
|
||||
onClick={() => onPageChange(currentPage + 1)}
|
||||
disabled={currentPage === totalPages}
|
||||
className="relative inline-flex items-center rounded-r-lg px-3 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 dark:ring-gray-600 dark:text-gray-400 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
<span className="sr-only">{t('common.next')}</span>
|
||||
<ArrowUpIcon className="h-4 w-4 rotate-90" />
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="text-center py-16">
|
||||
<div className="mx-auto max-w-md">
|
||||
<MagnifyingGlassIcon className="mx-auto h-12 w-12 text-gray-400" />
|
||||
<h3 className="mt-4 text-lg font-medium text-gray-900 dark:text-white">
|
||||
{searchTerm ? t('resultsTable.noResults') : t('resultsTable.noQueries')}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm text-gray-500 dark:text-gray-400">
|
||||
{searchTerm
|
||||
? t('resultsTable.noResultsMessage', { searchTerm })
|
||||
: t('resultsTable.noQueriesMessage')
|
||||
}
|
||||
</p>
|
||||
{searchTerm && (
|
||||
<button
|
||||
onClick={() => setSearchTerm('')}
|
||||
className="mt-4 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-primary-700 bg-primary-100 hover:bg-primary-200 dark:text-primary-400 dark:bg-primary-900/50 dark:hover:bg-primary-900/70 transition-colors"
|
||||
>
|
||||
{t('resultsTable.clearFilter')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ResultsTable;
|
||||
|
|
@ -23,6 +23,8 @@ interface ResultsTableProps {
|
|||
totalServerResults?: number;
|
||||
hasActiveFilters?: boolean;
|
||||
totalResultsBeforeFilter?: number;
|
||||
selectedRuts?: string[];
|
||||
onSelectionChange?: (ruts: string[]) => void;
|
||||
}
|
||||
|
||||
const ResultsTable: React.FC<ResultsTableProps> = ({
|
||||
|
|
@ -35,12 +37,14 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
onSort: externalOnSort,
|
||||
totalServerResults = 0,
|
||||
hasActiveFilters = false,
|
||||
totalResultsBeforeFilter = 0
|
||||
totalResultsBeforeFilter = 0,
|
||||
selectedRuts = [],
|
||||
onSelectionChange,
|
||||
}) => {
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [localSortField, setLocalSortField] = useState<string>('createdAt');
|
||||
const [localSortDirection, setLocalSortDirection] = useState<'asc' | 'desc'>('desc');
|
||||
|
||||
|
||||
const { t, i18n } = useTranslation();
|
||||
const localeMap: Record<string, string> = { es: 'es-ES', en: 'en-US', pt: 'pt-PT', fr: 'fr-FR' };
|
||||
const resolvedLangKey = (i18n.resolvedLanguage ?? i18n.language ?? 'es');
|
||||
|
|
@ -49,7 +53,7 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
// Ordenar localmente los resultados de la página actual
|
||||
const sortedResults = useMemo(() => {
|
||||
const resultsCopy = [...(results || [])];
|
||||
|
||||
|
||||
return resultsCopy.sort((a, b) => {
|
||||
let aValue: any;
|
||||
let bValue: any;
|
||||
|
|
@ -92,7 +96,7 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
const rut = (result.rut || result.details?.rut || '').toLowerCase();
|
||||
const razonSocial = (result.details?.razonSocial || '').toLowerCase();
|
||||
const matchesSearch = !searchTerm || rut.includes(searchLower) || razonSocial.includes(searchLower);
|
||||
|
||||
|
||||
return {
|
||||
...result,
|
||||
isVisible: matchesSearch
|
||||
|
|
@ -103,6 +107,32 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
const hiddenCount = resultsWithVisibility.length - visibleCount;
|
||||
const hasTableStructure = totalPages > 0;
|
||||
|
||||
const visibleRuts = resultsWithVisibility
|
||||
.filter(r => r.isVisible)
|
||||
.map(r => r.rut || r.details?.rut || '')
|
||||
.filter(Boolean);
|
||||
|
||||
const allVisibleSelected = visibleRuts.length > 0 && visibleRuts.every(rut => selectedRuts.includes(rut));
|
||||
|
||||
const toggleAllVisible = () => {
|
||||
if (!onSelectionChange) return;
|
||||
if (allVisibleSelected) {
|
||||
onSelectionChange(selectedRuts.filter(rut => !visibleRuts.includes(rut)));
|
||||
} else {
|
||||
const merged = Array.from(new Set([...selectedRuts, ...visibleRuts]));
|
||||
onSelectionChange(merged);
|
||||
}
|
||||
};
|
||||
|
||||
const toggleOneRut = (rut: string) => {
|
||||
if (!onSelectionChange) return;
|
||||
if (selectedRuts.includes(rut)) {
|
||||
onSelectionChange(selectedRuts.filter(r => r !== rut));
|
||||
} else {
|
||||
onSelectionChange([...selectedRuts, rut]);
|
||||
}
|
||||
};
|
||||
|
||||
// Manejar ordenamiento local
|
||||
const handleLocalSort = (field: string) => {
|
||||
if (localSortField === field) {
|
||||
|
|
@ -240,18 +270,7 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
<p className="text-sm text-gray-500 dark:text-gray-400">{t('dashboard.recentQueriesSubtitle', { defaultValue: 'Historial de evaluaciones realizadas' })}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="relative">
|
||||
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<MagnifyingGlassIcon className="h-5 w-5 text-gray-400" />
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
placeholder={t('consultas.searchPlaceholder')}
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
className="block w-full pl-10 pr-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent sm:text-sm"
|
||||
/>
|
||||
</div> */}
|
||||
|
||||
</div>
|
||||
{hasTableStructure ? (
|
||||
<>
|
||||
|
|
@ -260,6 +279,14 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
<table className="min-w-full divide-y divide-gray-200 dark:divide-gray-600">
|
||||
<thead className="bg-gray-50 dark:bg-gray-700/50">
|
||||
<tr>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={allVisibleSelected}
|
||||
onChange={toggleAllVisible}
|
||||
className="w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"
|
||||
/>
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-4 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wider">
|
||||
<button
|
||||
onClick={() => handleLocalSort('rut')}
|
||||
|
|
@ -336,54 +363,67 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
<tbody className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
{resultsWithVisibility.length > 0 ? (
|
||||
<>
|
||||
{resultsWithVisibility.map((result) => (
|
||||
<tr
|
||||
key={result._id}
|
||||
className={`hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${!result.isVisible ? 'hidden' : ''}`}
|
||||
>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium text-gray-900 dark:text-white">
|
||||
{result.rut || result.details?.rut}
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-gray-900 dark:text-white">
|
||||
<div className="flex items-center">
|
||||
<BuildingOfficeIcon className="h-4 w-4 text-gray-400 mr-2 flex-shrink-0" />
|
||||
<span className="truncate">{result.details?.razonSocial}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-gray-900 dark:text-white">
|
||||
<div className="flex items-center gap-1 flex-wrap">
|
||||
{result?.noteTags?.map((noteTag: any, index: number) =>
|
||||
<span key={index} className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300">
|
||||
{noteTag}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm">
|
||||
<span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${getRiskLevelClass(result.riskAssessment?.riskSummary?.semaphore || 'unknown')}`}>
|
||||
{getRiskLevelDisplayName(result.riskAssessment?.riskSummary?.semaphore || t('common.notAvailable'))}
|
||||
</span>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
<div className="flex items-center">
|
||||
<CalendarIcon className="h-4 w-4 text-gray-400 mr-2" />
|
||||
{new Date(result.createdAt).toLocaleDateString(dateLocale)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium">
|
||||
<Link
|
||||
to={`/consultas/${result._id}`}
|
||||
className="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-md text-primary-700 bg-primary-100 hover:bg-primary-200 dark:text-primary-400 dark:bg-primary-900/50 dark:hover:bg-primary-900/70 transition-colors"
|
||||
>
|
||||
<EyeIcon className="h-4 w-4 mr-1" />
|
||||
{t('consultas.viewDetail', { defaultValue: 'Ver Detalle' })}
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{resultsWithVisibility.map((result) => {
|
||||
const rutValue = result.rut || result.details?.rut || '';
|
||||
return (
|
||||
<tr
|
||||
key={result._id}
|
||||
className={`hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${!result.isVisible ? 'hidden' : ''}`}
|
||||
>
|
||||
<td className="whitespace-nowrap px-6 py-4">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={selectedRuts.includes(rutValue)}
|
||||
onChange={() => toggleOneRut(rutValue)}
|
||||
className="w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"
|
||||
/>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium text-gray-900 dark:text-white">
|
||||
{result.rut || result.details?.rut}
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-gray-900 dark:text-white">
|
||||
<div className="flex items-center">
|
||||
<BuildingOfficeIcon className="h-4 w-4 text-gray-400 mr-2 flex-shrink-0" />
|
||||
<span className="truncate">{result.details?.razonSocial}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-gray-900 dark:text-white">
|
||||
<div className="flex items-center gap-1 flex-wrap">
|
||||
{result?.noteTags?.map((noteTag: any, index: number) =>
|
||||
<span key={index} className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300">
|
||||
{noteTag}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm">
|
||||
<span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold ${getRiskLevelClass(result.riskAssessment?.riskSummary?.semaphore || 'unknown')}`}>
|
||||
{getRiskLevelDisplayName(result.riskAssessment?.riskSummary?.semaphore || t('common.notAvailable'))}
|
||||
</span>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
<div className="flex items-center">
|
||||
<CalendarIcon className="h-4 w-4 text-gray-400 mr-2" />
|
||||
{new Date(result.createdAt).toLocaleDateString(dateLocale)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-sm font-medium">
|
||||
<Link
|
||||
to={`/consultas/${result._id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-md text-primary-700 bg-primary-100 hover:bg-primary-200 dark:text-primary-400 dark:bg-primary-900/50 dark:hover:bg-primary-900/70 transition-colors"
|
||||
>
|
||||
<EyeIcon className="h-4 w-4 mr-1" />
|
||||
{t('consultas.viewDetail', { defaultValue: 'Ver Detalle' })}
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
{visibleCount === 0 && (
|
||||
<tr>
|
||||
<td colSpan={6} className="px-6 py-12 text-center">
|
||||
<td colSpan={7} className="px-6 py-12 text-center">
|
||||
<div className="mx-auto max-w-md">
|
||||
<MagnifyingGlassIcon className="mx-auto h-12 w-12 text-gray-400" />
|
||||
<h3 className="mt-4 text-lg font-medium text-gray-900 dark:text-white">
|
||||
|
|
@ -407,7 +447,7 @@ const ResultsTable: React.FC<ResultsTableProps> = ({
|
|||
</>
|
||||
) : (
|
||||
<tr>
|
||||
<td colSpan={6} className="px-6 py-12 text-center">
|
||||
<td colSpan={7} className="px-6 py-12 text-center">
|
||||
<div className="mx-auto max-w-md">
|
||||
<MagnifyingGlassIcon className="mx-auto h-12 w-12 text-gray-400" />
|
||||
<h3 className="mt-4 text-lg font-medium text-gray-900 dark:text-white">
|
||||
|
|
|
|||
212
src/components/ui/DeepAnalysisPanel/DeepAnalysisPanel.tsx
Normal file
212
src/components/ui/DeepAnalysisPanel/DeepAnalysisPanel.tsx
Normal file
|
|
@ -0,0 +1,212 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { DocumentArrowDownIcon, EyeIcon } from '@heroicons/react/24/outline';
|
||||
|
||||
interface ParametroCritico {
|
||||
label: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface DimensionCritica {
|
||||
name: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface RutInfo {
|
||||
rut: string;
|
||||
razonSocial: string;
|
||||
fecha: string;
|
||||
_id: string;
|
||||
}
|
||||
|
||||
interface DeepAnalysisData {
|
||||
dimensionesCriticas: DimensionCritica[];
|
||||
parametrosCriticos: ParametroCritico[];
|
||||
rutsByParam: Record<string, RutInfo[]>;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
data: DeepAnalysisData | null;
|
||||
loadingAnalysis: boolean;
|
||||
loadingExcel: boolean;
|
||||
onAnalyze: () => void;
|
||||
onExportExcel: () => void;
|
||||
}
|
||||
|
||||
const DeepAnalysisPanel: React.FC<Props> = ({ data, loadingAnalysis, loadingExcel, onAnalyze, onExportExcel }) => {
|
||||
const [selectedParams, setSelectedParams] = useState<string[]>([]);
|
||||
const maxCount = data ? Math.max(...data.parametrosCriticos.map(p => p.count), 1) : 1;
|
||||
|
||||
useEffect(() => {
|
||||
if (data && selectedParams.length > 0) {
|
||||
const validParams = selectedParams.filter(p => data.rutsByParam[p]);
|
||||
if (validParams.length !== selectedParams.length) {
|
||||
setSelectedParams(validParams);
|
||||
}
|
||||
}
|
||||
}, [data, selectedParams]);
|
||||
|
||||
const toggleParam = (label: string) => {
|
||||
setSelectedParams(prev =>
|
||||
prev.includes(label) ? prev.filter(p => p !== label) : [...prev, label]
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="bg-white dark:bg-gray-800 shadow-lg rounded-xl border border-gray-200 dark:border-gray-700 p-6">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<h3 className="text-xl font-semibold text-gray-900 dark:text-white">Análisis Profundo</h3>
|
||||
<div className="flex gap-3">
|
||||
<button
|
||||
onClick={onAnalyze}
|
||||
disabled={loadingAnalysis}
|
||||
data-pdf-hide="true"
|
||||
className="bg-primary-600 text-white px-6 py-2 rounded-lg font-medium hover:bg-primary-700 transition-colors disabled:opacity-50"
|
||||
>
|
||||
{loadingAnalysis ? "Analizando..." : "Mostrar analisis profundo"}
|
||||
</button>
|
||||
<button
|
||||
onClick={onExportExcel}
|
||||
disabled={loadingExcel || loadingAnalysis}
|
||||
data-pdf-hide="true"
|
||||
className="flex items-center gap-2 bg-green-600 text-white px-6 py-2 rounded-lg font-medium hover:bg-green-700 transition-all disabled:opacity-50"
|
||||
>
|
||||
<DocumentArrowDownIcon className="h-5 w-5" />
|
||||
{loadingExcel ? "Generando Excel..." : "Exportar Excel info de los RUT"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{data && data.parametrosCriticos.length > 0 && (
|
||||
<>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
{/* Dimensiones Críticas - solo parámetros severo/Crítico con nombre y conteo */}
|
||||
<div className="lg:col-span-1">
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900 dark:text-white">Parametros severos
|
||||
</h4>
|
||||
<span className="text-xs font-semibold text-red-600 dark:text-red-400 bg-red-100 dark:bg-red-900/30 px-2 py-0.5 rounded-full">
|
||||
Crítico
|
||||
</span>
|
||||
</div>
|
||||
<ul className="space-y-2">
|
||||
{data.dimensionesCriticas.map((dim, i) => (
|
||||
<li key={i} className="flex items-start gap-2 py-1">
|
||||
<span className="w-2 h-2 mt-1.5 rounded-full flex-shrink-0 bg-red-500" />
|
||||
<span className="text-sm text-gray-800 dark:text-gray-200 flex-1 leading-tight">
|
||||
{dim.name}
|
||||
</span>
|
||||
<span className={`text-sm font-bold flex-shrink-0 ${dim.count > 0 ? 'text-red-600 dark:text-red-400' : 'text-gray-400 dark:text-gray-500'}`}>
|
||||
{dim.count}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Parámetros Críticos - gráfico de barras */}
|
||||
<div className="lg:col-span-2">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900 dark:text-white">Recurrencia por parámetro</h4>
|
||||
<span className="inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400">
|
||||
<span className="w-3 h-3 rounded-full bg-blue-500 inline-block" />
|
||||
Crítico / Alto
|
||||
</span>
|
||||
</div>
|
||||
<div className="space-y-3">
|
||||
{data.parametrosCriticos.map((param, i) => (
|
||||
<div key={i} className="flex items-center gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={selectedParams.includes(param.label)}
|
||||
onChange={() => toggleParam(param.label)}
|
||||
className="w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500 flex-shrink-0"
|
||||
/>
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300 w-56 text-right flex-shrink-0 truncate" title={param.label}>
|
||||
{param.label}
|
||||
</span>
|
||||
<div className="flex-1 flex items-center gap-2">
|
||||
<div className="flex-1 bg-gray-100 dark:bg-gray-700 rounded-full h-6 overflow-hidden">
|
||||
<div
|
||||
className="bg-blue-500 h-full rounded-full flex items-center transition-all duration-500 min-w-[32px]"
|
||||
style={{ width: `${Math.max((param.count / maxCount) * 100, 8)}%` }}
|
||||
>
|
||||
<span className="text-xs font-bold text-white ml-auto pr-3">{param.count}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{selectedParams.length > 0 && (
|
||||
<div className="mt-6 pt-6 border-t border-gray-200 dark:border-gray-700">
|
||||
<div data-pdf-table-header="true" className="flex items-center justify-between mb-3">
|
||||
<h4 className="text-lg font-semibold text-gray-900 dark:text-white">
|
||||
RUTs por Parámetro Seleccionado ({selectedParams.length})
|
||||
</h4>
|
||||
<button
|
||||
onClick={() => setSelectedParams([])}
|
||||
data-pdf-hide="true"
|
||||
className="text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200"
|
||||
>
|
||||
Limpiar selección
|
||||
</button>
|
||||
</div>
|
||||
<div data-pdf-section="rut-card" className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden">
|
||||
<div data-pdf-expand="true" className="overflow-auto max-h-96">
|
||||
<table className="min-w-full text-sm">
|
||||
<thead className="bg-gray-50 dark:bg-gray-700 sticky top-0">
|
||||
<tr>
|
||||
<th className="px-3 py-2 text-left font-semibold text-gray-700 dark:text-gray-300">Parámetro</th>
|
||||
<th className="px-3 py-2 text-left font-semibold text-gray-700 dark:text-gray-300">RUT</th>
|
||||
<th className="px-3 py-2 text-left font-semibold text-gray-700 dark:text-gray-300">Razón Social</th>
|
||||
<th className="px-3 py-2 text-left font-semibold text-gray-700 dark:text-gray-300">Fecha</th>
|
||||
<th className="px-3 py-2 text-left font-semibold text-gray-700 dark:text-gray-300">Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{selectedParams.flatMap(paramLabel =>
|
||||
(data.rutsByParam[paramLabel] || []).map((r, idx) => (
|
||||
<tr key={`${paramLabel}-${idx}`} className="border-t border-gray-200 dark:border-gray-700">
|
||||
<td className="px-3 py-2 text-gray-900 dark:text-gray-100 font-medium">{paramLabel}</td>
|
||||
<td className="px-3 py-2 text-gray-900 dark:text-gray-100">{r.rut}</td>
|
||||
<td className="px-3 py-2 text-gray-700 dark:text-gray-300">{r.razonSocial}</td>
|
||||
<td className="px-3 py-2 text-gray-500 dark:text-gray-400">
|
||||
{r.fecha ? new Date(r.fecha).toLocaleDateString('es-CL') : '-'}
|
||||
</td>
|
||||
<td className="px-3 py-2">
|
||||
{r._id && (
|
||||
<Link
|
||||
to={`/consultas/${r._id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-md text-primary-700 bg-primary-100 hover:bg-primary-200 dark:text-primary-400 dark:bg-primary-900/50 dark:hover:bg-primary-900/70 transition-colors"
|
||||
>
|
||||
<EyeIcon className="h-4 w-4 mr-1" />
|
||||
Ver Detalle
|
||||
</Link>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
))
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{data && data.parametrosCriticos.length === 0 && (
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">No se encontraron parámetros críticos o altos.</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeepAnalysisPanel;
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user