Compare commits
8 Commits
vucem-form
...
T2025-09-0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c40275381 | |||
| 07facb8ae2 | |||
| 0d60156b7f | |||
| a36178df1b | |||
| 50716e363d | |||
| 4b66b4944a | |||
| 4414923d04 | |||
| a78ed6f51b |
10
package-lock.json
generated
10
package-lock.json
generated
@@ -15,6 +15,7 @@
|
|||||||
"chart.js": "^4.5.0",
|
"chart.js": "^4.5.0",
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
|
"lucide-react": "^0.562.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-chartjs-2": "^5.3.0",
|
"react-chartjs-2": "^5.3.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
@@ -2603,6 +2604,15 @@
|
|||||||
"yallist": "^3.0.2"
|
"yallist": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lucide-react": {
|
||||||
|
"version": "0.562.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.562.0.tgz",
|
||||||
|
"integrity": "sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw==",
|
||||||
|
"license": "ISC",
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/memoize-one": {
|
"node_modules/memoize-one": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"chart.js": "^4.5.0",
|
"chart.js": "^4.5.0",
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
|
"lucide-react": "^0.562.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-chartjs-2": "^5.3.0",
|
"react-chartjs-2": "^5.3.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -594,6 +594,7 @@ const downloadExpediente = async (pedimentoId, pedimentoName, setSuccess, showMe
|
|||||||
|
|
||||||
const fileCount = uploadType === 'folders' ? filesToUpload.length : selectedFiles.length;
|
const fileCount = uploadType === 'folders' ? filesToUpload.length : selectedFiles.length;
|
||||||
showMessage(`Subiendo ${fileCount} archivo(s)...`, 'info');
|
showMessage(`Subiendo ${fileCount} archivo(s)...`, 'info');
|
||||||
|
let alertMessage = '';
|
||||||
|
|
||||||
const uploadEndpoint = `${API_URL}/customs/pedimentos/bulk-create/`;
|
const uploadEndpoint = `${API_URL}/customs/pedimentos/bulk-create/`;
|
||||||
const result = await postFormDataWithAuth(uploadEndpoint, formData);
|
const result = await postFormDataWithAuth(uploadEndpoint, formData);
|
||||||
@@ -610,10 +611,38 @@ const downloadExpediente = async (pedimentoId, pedimentoName, setSuccess, showMe
|
|||||||
}
|
}
|
||||||
showMessage(errorMsg, 'error');
|
showMessage(errorMsg, 'error');
|
||||||
}else{
|
}else{
|
||||||
showMessage(
|
const data = await result.json();
|
||||||
`${result.uploaded_count || fileCount} archivo(s) subido(s) exitosamente`,
|
console.log(data);
|
||||||
'success'
|
if(data.already_existing_count > 0){
|
||||||
);
|
// Crear una cadena con todos los pedimentos
|
||||||
|
const existingList = data.already_existing
|
||||||
|
.map(pedimento => `${pedimento.pedimento_app}`)
|
||||||
|
.join('\n');
|
||||||
|
showMessage(
|
||||||
|
`${data.message}\n\nPedimentos ya existentes:\n${existingList}`,
|
||||||
|
'warning'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if(data.failed_files && data.failed_files.length > 0) {
|
||||||
|
// Sección de archivos fallidos
|
||||||
|
alertMessage += `ARCHIVOS CON ERRORES (${data.failed_files.length}):\n`;
|
||||||
|
data.failed_files.forEach((file, index) => {
|
||||||
|
alertMessage += `\n${index + 1}. ${file.archivo_original}`;
|
||||||
|
alertMessage += `\n Error: ${file.error}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
showMessage(
|
||||||
|
`${alertMessage}`,
|
||||||
|
'warning'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
showMessage(
|
||||||
|
`${result.uploaded_count || fileCount} archivo(s) subido(s) exitosamente`,
|
||||||
|
'success'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// showMessage(
|
// showMessage(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user