feat(config): SII cert+CAF upload + medios de pago + ficha de negocio - #272
Open
pabloalvarez99 wants to merge 1 commit into
Open
feat(config): SII cert+CAF upload + medios de pago + ficha de negocio#272pabloalvarez99 wants to merge 1 commit into
pabloalvarez99 wants to merge 1 commit into
Conversation
Second W6 PR (stacked on feat/config-wire-sections). Completes the config hub: turns Facturación SII's "próximamente" card into real certificate + folio upload, and enriches Negocio with a contact profile and accepted tender. Client-only over backend already in base (#268 + config.rs). - Certificado digital (.pfx): file picker + passphrase + RUT + validity. The PFX is read base64 in the webview; the server verifies the material, encrypts it (AES-256-GCM + Argon2id) and discards the passphrase. - Folios CAF (.xml): SII XML upload; refreshes the remaining-folios counter. - Ficha del negocio (GET/PUT /config/business): razón social + giro/address/ phone/email — the UI/receipt card, distinct from SII dte.emisor identity. - Medios de pago (GET/PUT /config/payment-methods): server-catalog checkboxes, ≥1 required. Layers (ye scope): config-center.ts pure helpers (TDD, +8 tests); api.ts wrappers; src-tauri/lib.rs 6 commands + structs; configuracion.ts real cards in renderNegocio + renderSii + base64/text file readers; brand.css file/date inputs. No migrations. GATE: npm run build + npm test (661 ok, 7 todo) + cargo fmt --check + clippy --manifest-path client/src-tauri/Cargo.toml -D warnings (0 warnings). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
W6 ye (2/2) — completar el Config Center
Cascada sobre #270 (
feat/config-wire-sections). Convierte la card "próximamente" de Facturación SII en carga real de certificado + folios, y enriquece Negocio con ficha de contacto y medios de pago. Cliente puro sobre backend ya en base (#268 +config.rs); sin migraciones.Qué hace
POST /api/v1/dte/cert): selector de archivo + contraseña + RUT + vigencia. El .pfx se lee en base64 en el webview; el server valida el material, lo cifra (AES-256-GCM + Argon2id) y descarta la passphrase (nunca se persiste). Mismo flujo quepharma cert import.POST /api/v1/dte/caf): selector XML del SII; refresca el contador de folios al cargar.GET/PUT /api/v1/config/business): razón social (requerida) + giro/dirección/teléfono/correo. Tarjeta de contacto UI/comprobantes, distinta dedte.emisor.GET/PUT /api/v1/config/payment-methods): checkboxes del catálogo del servidor; exige ≥1.Capas (scope ye)
config-center.ts(helpers purospaymentLabel/validatePaymentSelection/validateCertForm) ·api.ts(wrappers) ·src-tauri/lib.rs(6 comandos + structs) ·configuracion.ts(cards reales en renderNegocio + renderSii + lectores de archivo base64/texto) ·brand.css(inputs file/date).GATE
npm run build✓ ·npm test✓ (661 ok, 7 todo)cargo fmt --check✓ ·cargo clippy --manifest-path client/src-tauri/Cargo.toml --all-targets -- -D warnings✓ (0 warnings)config-center.test.ts+8 (payment labels,validatePaymentSelection,validateCertFormpassphrase/RUT/vigencia).Cierra W6: el Config Center queda sin secciones "por CLI".
🤖 Generated with Claude Code