Actualizar Honduras y dist validado para produccion

This commit is contained in:
2026-09-09 11:17:28 -04:00
parent ca7595b346
commit 9cf20a3db4
21 changed files with 5148 additions and 6 deletions
+16 -2
View File
@@ -47,6 +47,13 @@ function getHistoryUrl(countryCode: string) {
);
}
if (countryCode === 'HN') {
return (
(import.meta.env.VITE_HISTORICOS_HN_URL as string | undefined) ||
'https://agenteit.digitalcompass.agency/webhook/cruce-cuentas-hn-historicos'
);
}
return (
(import.meta.env.VITE_HISTORICOS_GT_URL as string | undefined) ||
'https://agenteit.digitalcompass.agency/webhook/cruce-cuentas-gt-historicos'
@@ -72,6 +79,13 @@ function getMarkResolvedUrl(countryCode: string) {
);
}
if (countryCode === 'HN') {
return (
(import.meta.env.VITE_MARCAR_RESUELTO_HN_URL as string | undefined) ||
'https://agenteit.digitalcompass.agency/webhook/cruce-cuentas-hn-marcar-resuelto'
);
}
return (
(import.meta.env.VITE_MARCAR_RESUELTO_GT_URL as string | undefined) ||
'https://agenteit.digitalcompass.agency/webhook/cruce-cuentas-gt-marcar-resuelto'
@@ -157,7 +171,7 @@ function normalizeReports(input: unknown, country: CountryConfig): HistoricalRep
return {
id: String(report.id ?? `reporte-${index + 1}`),
country: (rawCountry === 'TT' ? 'TT' : rawCountry === 'PA' ? 'PA' : rawCountry === 'SV' ? 'SV' : 'GT') as HistoricalReport['country'],
country: (rawCountry === 'TT' ? 'TT' : rawCountry === 'PA' ? 'PA' : rawCountry === 'SV' ? 'SV' : rawCountry === 'HN' ? 'HN' : 'GT') as HistoricalReport['country'],
date: formatDate(report.fecha ?? report.period_end ?? rawExecutionDate, country.locale),
executionDate: formatDateTime(rawExecutionDate, country.locale),
period: String(report.periodo ?? report.period_label ?? report.period ?? 'Período no especificado'),
@@ -471,7 +485,7 @@ export default function History({
if (!isCurrentRequest()) return;
// Respaldo temporal: webhook histórico existente. También se envía el país
// para impedir que se mezclen reportes de Guatemala, Trinidad y Tobago, Panamá y El Salvador.
// para impedir que se mezclen reportes de Guatemala, Trinidad y Tobago, Panamá, El Salvador y Honduras.
const historyUrl = getHistoryUrl(country.code);
if (!historyUrl) {
throw new Error(`No está configurado el origen histórico de ${country.name}.`);