se hicieron modificaciones en el modulo de vucem
This commit is contained in:
@@ -151,12 +151,12 @@ export default function Vucem() {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await fetchWithAuth(`${API_URL}/vucem/vucem/`);
|
const res = await fetchWithAuth(`${API_URL}/vucem/vucem/`);
|
||||||
if (!res.ok) throw new Error('Error al cargar VUCEM');
|
if (!res.ok) throw new Error('Error al cargar Ventanilla Unica');
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setVucemList(data);
|
setVucemList(data);
|
||||||
setError(null);
|
setError(null);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError('Error al cargar VUCEM');
|
setError('Error al cargar Ventanilla Unica');
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
@@ -325,7 +325,7 @@ export default function Vucem() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-blue-100 text-sm sm:text-base font-medium">
|
<p className="text-blue-100 text-sm sm:text-base font-medium">
|
||||||
Gestiona certificados digitales, credenciales y configuraciones VUCEM del sistema aduanero
|
Gestiona certificados digitales, credenciales y configuraciones Ventanilla Unica del sistema aduanero
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -450,7 +450,7 @@ export default function Vucem() {
|
|||||||
<div className="flex items-center justify-center h-full w-full absolute left-0 top-0" style={{ minHeight: 'calc(8 * 56px)', background: 'rgba(255,255,255,0.7)', zIndex: 10 }}>
|
<div className="flex items-center justify-center h-full w-full absolute left-0 top-0" style={{ minHeight: 'calc(8 * 56px)', background: 'rgba(255,255,255,0.7)', zIndex: 10 }}>
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
|
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
|
||||||
<span className="text-gray-500 text-lg">Cargando registros VUCEM...</span>
|
<span className="text-gray-500 text-lg">Cargando registros Ventanilla Unica...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -694,8 +694,8 @@ export default function Vucem() {
|
|||||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-lg font-medium text-gray-900 mb-2">No hay registros VUCEM</h3>
|
<h3 className="text-lg font-medium text-gray-900 mb-2">No hay registros</h3>
|
||||||
<p className="text-gray-500">Comienza creando tu primer registro VUCEM.</p>
|
<p className="text-gray-500">Comienza creando tu primer registro de Ventanilla Unica.</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -710,7 +710,7 @@ export default function Vucem() {
|
|||||||
<div className="flex items-center justify-center py-12">
|
<div className="flex items-center justify-center py-12">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
|
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
|
||||||
<span className="text-gray-500 text-lg">Cargando registros VUCEM...</span>
|
<span className="text-gray-500 text-lg">Cargando registros...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : error ? (
|
) : error ? (
|
||||||
@@ -937,8 +937,8 @@ export default function Vucem() {
|
|||||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-lg font-medium text-gray-900 mb-2">No hay registros VUCEM</h3>
|
<h3 className="text-lg font-medium text-gray-900 mb-2">No hay registros</h3>
|
||||||
<p className="text-gray-500 text-center">Comienza creando tu primer registro VUCEM.</p>
|
<p className="text-gray-500 text-center">Comienza creando tu primer registro.</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -1009,7 +1009,7 @@ export default function Vucem() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-lg font-semibold tracking-wide">Registro de Credencial VUCEM</h3>
|
<h3 className="text-lg font-semibold tracking-wide">Registro de Credencial VU</h3>
|
||||||
<p className="text-blue-200 text-xs font-medium">Sistema de Gestión de Credenciales Aduanales</p>
|
<p className="text-blue-200 text-xs font-medium">Sistema de Gestión de Credenciales Aduanales</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1041,11 +1041,11 @@ export default function Vucem() {
|
|||||||
formData.append('is_active', form.is_active);
|
formData.append('is_active', form.is_active);
|
||||||
try {
|
try {
|
||||||
const res = await postFormDataWithAuth(`${API_URL}/vucem/vucem/`, formData);
|
const res = await postFormDataWithAuth(`${API_URL}/vucem/vucem/`, formData);
|
||||||
if (!res.ok) throw new Error('Error al crear VUCEM');
|
if (!res.ok) throw new Error('Error al crear');
|
||||||
await fetchVucem();
|
await fetchVucem();
|
||||||
closeModals();
|
closeModals();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('Error al crear VUCEM');
|
alert('Error al crear');
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
|
|
||||||
@@ -1059,13 +1059,13 @@ export default function Vucem() {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h4 className="text-sm font-semibold text-slate-800">Información Básica del Usuario</h4>
|
<h4 className="text-sm font-semibold text-slate-800">Información Básica del Usuario</h4>
|
||||||
<p className="text-xs text-slate-600">Datos de identificación del usuario VUCEM</p>
|
<p className="text-xs text-slate-600">Datos de identificación del usuario VU</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="block text-xs font-semibold text-slate-700">
|
<label className="block text-xs font-semibold text-slate-700">
|
||||||
Usuario VUCEM <span className="text-red-600">*</span>
|
Usuario VU <span className="text-red-600">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
name="usuario"
|
name="usuario"
|
||||||
@@ -1073,7 +1073,7 @@ export default function Vucem() {
|
|||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
required
|
required
|
||||||
className="w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white text-slate-900 placeholder-slate-400 text-sm"
|
className="w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white text-slate-900 placeholder-slate-400 text-sm"
|
||||||
placeholder="Ingrese el nombre de usuario VUCEM"
|
placeholder="Ingrese el nombre de usuario en Ventanilla Única"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
@@ -1353,7 +1353,7 @@ export default function Vucem() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-lg font-semibold tracking-wide">Editar Credencial VUCEM</h3>
|
<h3 className="text-lg font-semibold tracking-wide">Editar Credencial</h3>
|
||||||
<p className="text-blue-200 text-xs font-medium">Modificación de Credenciales Aduanales</p>
|
<p className="text-blue-200 text-xs font-medium">Modificación de Credenciales Aduanales</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1386,11 +1386,11 @@ export default function Vucem() {
|
|||||||
formData.append('is_active', form.is_active);
|
formData.append('is_active', form.is_active);
|
||||||
try {
|
try {
|
||||||
const res = await putFormDataWithAuth(`${API_URL}/vucem/vucem/${editVucem.id}/`, formData);
|
const res = await putFormDataWithAuth(`${API_URL}/vucem/vucem/${editVucem.id}/`, formData);
|
||||||
if (!res.ok) throw new Error('Error al actualizar VUCEM');
|
if (!res.ok) throw new Error('Error al actualizar');
|
||||||
await fetchVucem();
|
await fetchVucem();
|
||||||
closeModals();
|
closeModals();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('Error al actualizar VUCEM');
|
alert('Error al actualizar');
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
|
|
||||||
@@ -1404,13 +1404,13 @@ export default function Vucem() {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h4 className="text-sm font-semibold text-slate-800">Información Básica del Usuario</h4>
|
<h4 className="text-sm font-semibold text-slate-800">Información Básica del Usuario</h4>
|
||||||
<p className="text-xs text-slate-600">Datos de identificación del usuario VUCEM</p>
|
<p className="text-xs text-slate-600">Datos de identificación del usuario VU</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="block text-xs font-semibold text-slate-700">
|
<label className="block text-xs font-semibold text-slate-700">
|
||||||
Usuario VUCEM <span className="text-red-600">*</span>
|
Usuario VU <span className="text-red-600">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
name="usuario"
|
name="usuario"
|
||||||
@@ -1418,7 +1418,7 @@ export default function Vucem() {
|
|||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
required
|
required
|
||||||
className="w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white text-slate-900 placeholder-slate-400 text-sm"
|
className="w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white text-slate-900 placeholder-slate-400 text-sm"
|
||||||
placeholder="Ingrese el nombre de usuario VUCEM"
|
placeholder="Ingrese el nombre de usuario VU/RFC"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
@@ -1694,7 +1694,7 @@ export default function Vucem() {
|
|||||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M6 18L18 6M6 6l12 12" />
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M6 18L18 6M6 6l12 12" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-lg font-medium text-gray-900 mb-2">¿Eliminar VUCEM?</h3>
|
<h3 className="text-lg font-medium text-gray-900 mb-2">¿Eliminar Credencial?</h3>
|
||||||
<div className="mt-2 px-7 py-3">
|
<div className="mt-2 px-7 py-3">
|
||||||
<p className="text-sm text-gray-500 mb-4">
|
<p className="text-sm text-gray-500 mb-4">
|
||||||
¿Estás seguro que deseas eliminar el registro <span className="font-semibold">{deleteVucem.usuario}</span>?
|
¿Estás seguro que deseas eliminar el registro <span className="font-semibold">{deleteVucem.usuario}</span>?
|
||||||
@@ -1707,11 +1707,11 @@ export default function Vucem() {
|
|||||||
if (!deleteVucem) return;
|
if (!deleteVucem) return;
|
||||||
try {
|
try {
|
||||||
const res = await deleteWithAuth(`${API_URL}/vucem/vucem/${deleteVucem.id}/`);
|
const res = await deleteWithAuth(`${API_URL}/vucem/vucem/${deleteVucem.id}/`);
|
||||||
if (!res.ok) throw new Error('Error al eliminar VUCEM');
|
if (!res.ok) throw new Error('Error al eliminar');
|
||||||
await fetchVucem();
|
await fetchVucem();
|
||||||
closeModals();
|
closeModals();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('Error al eliminar VUCEM');
|
alert('Error al eliminar');
|
||||||
}
|
}
|
||||||
}} className="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 transition-colors disabled:opacity-50 flex items-center">Eliminar</button>
|
}} className="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 transition-colors disabled:opacity-50 flex items-center">Eliminar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user