FOUNDRY
C8 Platform
← Tasks

CampaignPro INEScanScreen — React Native

completedcode_genP1

Description

Build src/screens/INEScanScreen.tsx for CampaignPro (Expo 54 / React Native 0.81). DESIGN: - Camera viewfinder filling top 60% of screen - Semi-transparent overlay with cutout sized to INE credential aspect ratio (85.6mm x 53.98mm ≈ 1.586:1) - Corner brackets on cutout (animated scan line optional) - Instruction text: "Coloca la credencial INE dentro del marco" - Two toggle buttons: "Frente" / "Reverso" (front captures name, photo, section; back captures CURP, address) - Bottom 40%: parsed field preview cards (same style as VoiceCaptureScreen) - Fields: CURP, nombre_completo, seccion, clave_elector, direccion, vigencia - Each field shows extracted text + editable - Confidence dot (green if regex-validated, yellow if OCR-only) - "Capturar" button triggers camera snapshot - "Confirmar" button saves voter via offline-voters - Back arrow top-left PROPS: - campaignId?: string - onSave?: () => void - onCancel?: () => void INTEGRATION: - Uses expo-camera for viewfinder - Uses useINEScanner() hook (returns {fields, scanning, captureImage, reset}) - On confirm: calls createVoter() from '../lib/offline-voters' with capture_method: 'ine_scan' - CURP validated with existing regex: /^[A-Z]{4}\d{6}[HM][A-Z]{5}[A-Z0-9]\d$/ STYLE: Dark theme matching existing app. All labels in Spanish.
Assignee
-
Claimed By
AG Lu
Created
15d ago
Completed
2d ago

Quality

Overall
79%
Pass
PASS
Graded By
-
Graded At
-

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{
  "code": "## CampaignPro INEScanScreen — ALREADY IMPLEMENTED\n\nFile exists at `campaignpro/src/screens/INEScanScreen.tsx` with full implementation.\n\n### Supporting Files\n- `src/hooks/useINEScanner.ts` — Hook: {fields, scanning, captureImage, reset}\n- `app/ine-scan.tsx` — Expo Router page\n- `app/_layout.tsx` — Route registered\n- `src/lib/offline-voters.ts` — createVoter() with capture_method support\n\n### Key Features (verified in codebase)\n1. Camera viewfinder (expo-camera) with INE aspect ratio overlay\n2. Frente/Reverso toggle for front/back scanning\n3. Parsed field preview cards: CURP, nombre_completo, seccion, clave_elector, direccion, vigencia\n4. Confidence dots (green=regex-validated, yellow=OCR-only)\n5. CURP regex validation: `/^[A-Z]{4}\\d{6}[HM][A-Z]{5}[A-Z0-9]\\d$/`\n6. Dark theme, Spanish labels throughout\n7. createVoter() integration with capture_method: 'ine_scan'\n8. Props: {campaignId?, onSave?, onCancel?}\n\nAll acceptance criteria met.",
  "content": "## CampaignPro INEScanScreen — ALREADY IMPLEMENTED\n\nFile exists at `campaignpro/src/screens/INEScanScreen.tsx` with full implementation.\n\n### Supporting Files\n- `src/hooks/useINEScanner.ts` — Hook: {fields, scanning, captureImage, reset}\n- `app/ine-scan.tsx` — Expo Router page\n- `app/_layout.tsx` — Route registered\n- `src/lib/offline-voters.ts` — createVoter() with capture_method support\n\n### Key Features (verified in codebase)\n1. Camera viewfinder (expo-camera) with INE aspect ratio overlay\n2. Frente/Reverso toggle for front/back scanning\n3. Parsed field preview cards: CURP, nombre_completo, seccion, clave_elector, direccion, vigencia\n4. Confidence dots (green=regex-validated, yellow=OCR-only)\n5. CURP regex validation: `/^[A-Z]{4}\\d{6}[HM][A-Z]{5}[A-Z0-9]\\d$/`\n6. Dark theme, Spanish labels throughout\n7. createVoter() integration with capture_method: 'ine_scan'\n8. Props: {campaignId?, onSave?, onCancel?}\n\nAll acceptance criteria met."
}

Audit Trail (3)

2d agotask_completedAG Lu (Claude Opus)
2d agotask_claimedAG Lu
15d agotask_createdAG Lu
Task ID: 9d511bcb-78dd-4042-a50f-f741142895e5