datastage
This commit is contained in:
@@ -381,11 +381,11 @@ export default function Datastage() {
|
|||||||
<tr key={item.id} className="hover:bg-slate-50 transition-colors">
|
<tr key={item.id} className="hover:bg-slate-50 transition-colors">
|
||||||
<td className="border px-2 py-2 text-center">{item.id}</td>
|
<td className="border px-2 py-2 text-center">{item.id}</td>
|
||||||
<td className="border px-2 py-2 max-w-xs truncate">
|
<td className="border px-2 py-2 max-w-xs truncate">
|
||||||
{item.archivo ? (
|
{item.download_url ? (
|
||||||
<span className="flex items-center gap-1 text-xs text-gray-700 truncate font-mono">
|
<span className="flex items-center gap-1 text-xs text-gray-700 truncate font-mono">
|
||||||
{(() => {
|
{(() => {
|
||||||
try {
|
try {
|
||||||
const url = new URL(item.archivo);
|
const url = new URL(item.download_url);
|
||||||
return decodeURIComponent(url.pathname.split('/').pop() || '');
|
return decodeURIComponent(url.pathname.split('/').pop() || '');
|
||||||
} catch {
|
} catch {
|
||||||
return '';
|
return '';
|
||||||
@@ -399,7 +399,7 @@ export default function Datastage() {
|
|||||||
item.id,
|
item.id,
|
||||||
(() => {
|
(() => {
|
||||||
try {
|
try {
|
||||||
const url = new URL(item.archivo);
|
const url = new URL(item.download_url);
|
||||||
return decodeURIComponent(url.pathname.split('/').pop() || '');
|
return decodeURIComponent(url.pathname.split('/').pop() || '');
|
||||||
} catch {
|
} catch {
|
||||||
return '';
|
return '';
|
||||||
@@ -507,16 +507,16 @@ export default function Datastage() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1 text-xs text-gray-700 break-all font-mono mb-1">
|
<div className="flex items-center gap-1 text-xs text-gray-700 break-all font-mono mb-1">
|
||||||
{item.archivo ? (
|
{item.download_url ? (
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
{(() => { try { const url = new URL(item.archivo); return decodeURIComponent(url.pathname.split('/').pop() || ''); } catch { return ''; } })()}
|
{(() => { try { const url = new URL(item.download_url); return decodeURIComponent(url.pathname.split('/').pop() || ''); } catch { return ''; } })()}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="inline-flex items-center justify-center w-6 h-6 rounded bg-blue-100 border border-blue-200 text-blue-700 hover:bg-blue-200 hover:border-blue-300 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-400 ml-1"
|
className="inline-flex items-center justify-center w-6 h-6 rounded bg-blue-100 border border-blue-200 text-blue-700 hover:bg-blue-200 hover:border-blue-300 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-400 ml-1"
|
||||||
title="Descargar archivo"
|
title="Descargar archivo"
|
||||||
onClick={() => downloadDatastageFile(
|
onClick={() => downloadDatastageFile(
|
||||||
item.id,
|
item.id,
|
||||||
(() => { try { const url = new URL(item.archivo); return decodeURIComponent(url.pathname.split('/').pop() || ''); } catch { return ''; } })()
|
(() => { try { const url = new URL(item.download_url); return decodeURIComponent(url.pathname.split('/').pop() || ''); } catch { return ''; } })()
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
@@ -803,7 +803,7 @@ export default function Datastage() {
|
|||||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40">
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40">
|
||||||
<div className="bg-white rounded-xl shadow-2xl border border-blue-200 p-8 max-w-sm w-full flex flex-col animate-fade-in">
|
<div className="bg-white rounded-xl shadow-2xl border border-blue-200 p-8 max-w-sm w-full flex flex-col animate-fade-in">
|
||||||
<h3 className="text-lg font-bold mb-2 text-blue-900">Detalle de Datastage #{selected.id}</h3>
|
<h3 className="text-lg font-bold mb-2 text-blue-900">Detalle de Datastage #{selected.id}</h3>
|
||||||
<div className="mb-1"><b>Archivo:</b> {selected.archivo ? <a href={selected.archivo} target="_blank" rel="noopener noreferrer" className="text-blue-600 underline break-all">Descargar</a> : <span className="text-gray-400">Sin archivo</span>}</div>
|
{/* <div className="mb-1"><b>Archivo:</b> {selected.download_url ? <a href={selected.download_url} target="_blank" rel="noopener noreferrer" className="text-blue-600 underline break-all">Descargar</a> : <span className="text-gray-400">Sin archivo</span>}</div> */}
|
||||||
<div className="mb-1"><b>Contribuyente:</b> {selected.contribuyente}</div>
|
<div className="mb-1"><b>Contribuyente:</b> {selected.contribuyente}</div>
|
||||||
<div className="mb-1"><b>Procesado:</b> <span className={selected.procesado ? 'bg-green-100 text-green-700 px-2 py-0.5 rounded-full text-xs' : 'bg-yellow-100 text-yellow-700 px-2 py-0.5 rounded-full text-xs'}>{selected.procesado ? 'Sí' : 'No'}</span></div>
|
<div className="mb-1"><b>Procesado:</b> <span className={selected.procesado ? 'bg-green-100 text-green-700 px-2 py-0.5 rounded-full text-xs' : 'bg-yellow-100 text-yellow-700 px-2 py-0.5 rounded-full text-xs'}>{selected.procesado ? 'Sí' : 'No'}</span></div>
|
||||||
<div className="mb-1"><b>Organización:</b> {selected.organizacion}</div>
|
<div className="mb-1"><b>Organización:</b> {selected.organizacion}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user