fix(xml-rb-systems): ocultar puertos en exportación y mover validación a importación
Para exportación los puertos vienen del manifiesto en BD (entry_port/foreign_exit_port), no del request. El selector de puertos ahora solo aparece cuando movementType === 'Importacion'. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -129,13 +129,13 @@
|
|||||||
|
|
||||||
// --- XML_RB_SYSTEMS ---
|
// --- XML_RB_SYSTEMS ---
|
||||||
if (interfaceType === 'XML_RB_SYSTEMS') {
|
if (interfaceType === 'XML_RB_SYSTEMS') {
|
||||||
|
try {
|
||||||
|
let res;
|
||||||
|
if (movementType === 'Importacion') {
|
||||||
if (!entryPort || !exitPort) {
|
if (!entryPort || !exitPort) {
|
||||||
toast.error('Debe seleccionar tanto el puerto de entrada como el de salida');
|
toast.error('Debe seleccionar tanto el puerto de entrada como el de salida');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
let res;
|
|
||||||
if (movementType === 'Importacion') {
|
|
||||||
const validInvoices = manualInvoices.filter((i) => i && i.trim() !== '');
|
const validInvoices = manualInvoices.filter((i) => i && i.trim() !== '');
|
||||||
if (validInvoices.length === 0) {
|
if (validInvoices.length === 0) {
|
||||||
toast.error('Debe seleccionar al menos una factura');
|
toast.error('Debe seleccionar al menos una factura');
|
||||||
@@ -156,8 +156,6 @@
|
|||||||
}
|
}
|
||||||
res = await reportsTransmissionApi.triggerXmlRbSystemsExpo({
|
res = await reportsTransmissionApi.triggerXmlRbSystemsExpo({
|
||||||
manifest_numbers: validManifests,
|
manifest_numbers: validManifests,
|
||||||
entry_port: entryPort,
|
|
||||||
exit_port: exitPort,
|
|
||||||
include_emanifest: !checks.no_enviar_emanifest
|
include_emanifest: !checks.no_enviar_emanifest
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -494,8 +492,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Ports Selection (Importacion y XML_RB_SYSTEMS) -->
|
<!-- Ports Selection: solo para Importacion (expo XML_RB_SYSTEMS toma puertos del manifiesto) -->
|
||||||
{#if movementType === 'Importacion' || interfaceType === 'XML_RB_SYSTEMS'}
|
{#if movementType === 'Importacion'}
|
||||||
<div class="mt-2 grid grid-cols-2 gap-4">
|
<div class="mt-2 grid grid-cols-2 gap-4">
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<Label>Puerto Entrada</Label>
|
<Label>Puerto Entrada</Label>
|
||||||
|
|||||||
Reference in New Issue
Block a user