identity-vault/app/views/verifications
nora 105e4b7a7c
Now you're thinking with portals! (#89)
* Extract verification flow logic into VerificationFlow concern

Move document submission handling and helper methods from
VerificationsController into a reusable concern:
- setup_document_step, handle_document_submission
- process_legal_name, process_aadhaar_number
- create_verification, document_params
- verification_should_redirect? helper

Extract document form into shared partial for reuse across
regular and portal verification flows.

* Extract address building into AddressManagement concern

Move build_address helper into a shared concern for reuse
between AddressesController and Portal::AddressesController.

* Add PortalFlow concern and base controller for external app flows

PortalFlow provides secure redirect handling for portal flows:
- Validates return URLs against registered Program redirect URIs
- Stores validated URLs in session to prevent tampering
- Allows localhost in non-production environments
- Provides redirect helpers with portal_status query param

Portal::BaseController uses logged_out layout with portal_wrapper
content block for minimal UI.

* Add portal controllers and routes for external app integration

Portal::VerificationsController handles document verification flow
triggered by external OAuth apps, with status-based redirects.

Portal::AddressesController handles address collection with manage
view for users who already have addresses.

Routes:
- GET/POST/DELETE /portal/verify
- GET/POST /portal/address
- GET /portal/address/done

Also adds make_primary member route to addresses resource.

* Add HTMX support to AddressesController for dynamic updates

Refactor AddressesController:
- Extract create/primary logic into helper methods
- Add HTMX-aware response methods for partial updates
- Support portal context detection for shared address list

Add partials:
- _address_list.html.erb: Shared address list with HTMX actions
- _edit_form.html.erb: Inline edit form for HTMX requests
- Update _form.html.erb with HTMX form attributes when target provided

Address list supports both regular and portal contexts with
appropriate HTMX targets and translations.

* Add portal views and translations

Portal views:
- verifications/document.html.erb: Document upload for portal flow
- verifications/pending.html.erb: Pending verification status
- addresses/portal.html.erb: Initial address collection form
- addresses/manage.html.erb: Address list for existing addresses

Update logged_out layout to support portal_wrapper content block
with minimal brand header for portal flows. Add HTMX CSRF header.

Add translations for portal verification and address flows.

* Add Program.official scope and update address styles

Add scope to filter HQ-official programs.

Update address styles for portal and HTMX address management:
- Improved address card layout with flex
- Add address card and button styles
- Pending verification card styles
- Portal done button styling

* fix address nit?
2025-12-09 12:46:05 -05:00
..
document.html.erb Now you're thinking with portals! (#89) 2025-12-09 12:46:05 -05:00
status.html.erb a small part of the inevitable css pass 2025-12-02 03:01:38 -05:00