Merge pull request 'feature/estados-codigo-postal-corregidos' (#180) from feature/characters-postal-code into development

Reviewed-on: ADUANASOFT/anexo76#180
This commit is contained in:
2026-03-03 20:07:42 +00:00
4 changed files with 10 additions and 2 deletions

4
.gitignore vendored
View File

@@ -67,3 +67,7 @@ postgres-data/
backend/uploads/
docker-compose.yml
.mypy_cache/
# Celery
celerybeat-schedule

View File

@@ -275,7 +275,7 @@
<div class="grid grid-cols-4 gap-4">
<div class="space-y-2">
<Label for="postal_code">C.P.</Label>
<Input id="postal_code" bind:value={formData.postal_code} disabled={loading} />
<Input id="postal_code" bind:value={formData.postal_code} disabled={loading} oninput={(e) => { formData.postal_code = e.currentTarget.value.replace(/[^a-zA-Z0-9]/g, ''); }} />
</div>
<div class="space-y-2 col-span-2">
<Label for="city">Ciudad</Label>

View File

@@ -318,6 +318,7 @@
placeholder="C.P."
maxlength={15}
disabled={loading}
oninput={(e) => { formData.postal_code = e.currentTarget.value.replace(/[^a-zA-Z0-9]/g, ''); }}
/>
</div>

View File

@@ -199,7 +199,9 @@
}
function handleStateSelect(state: any) {
formData.state = state.m3_key || state.mex_key || state.ame_key;
// Mostrar en Estado la clave del estado (mex_key/ame_key), no el país (m3_key)
formData.state = state.mex_key || state.ame_key || state.m3_key;
if (state.m3_key) formData.country = state.m3_key;
}
// --- 4. GUARDADO ---
@@ -538,6 +540,7 @@
placeholder="32000"
disabled={loading}
class="h-10"
oninput={(e) => { formData.postal_code = e.currentTarget.value.replace(/[^a-zA-Z0-9]/g, ''); }}
/>
</div>
<div class="grid gap-2 md:col-span-2">