CRITICAL story-encrypted-task-assignment-coordinator-001 8 pts

User Story

As a Coordinator
I want to compose an assignment containing sensitive personal information — including the contact's name, address, and medical summary (epikrise) — and dispatch it to a specific peer mentor in encrypted form
So that So that sensitive data is transmitted securely in compliance with GDPR, the peer mentor receives all necessary information to carry out a home visit, and I have audit-trail confirmation of dispatch

Acceptance Criteria

  • Given a coordinator has opened the Task Assignment Screen, when they fill in contact name, address, and medical summary and select a peer mentor, then the form validates all required fields before enabling dispatch
  • Given the coordinator taps Dispatch, when the Task Encryption Service encrypts the payload using the peer mentor's public key, then the ciphertext is stored in Supabase and no plaintext sensitive data is persisted server-side
  • Given encryption completes successfully, when the assignment is saved, then the coordinator sees a confirmation screen with the assignment ID and expected delivery status
  • Given the selected peer mentor has no registered public key, when the coordinator attempts dispatch, then an informative error is shown and dispatch is blocked until the key issue is resolved
  • Given the device is offline, when the coordinator attempts dispatch, then a queued-for-send state is shown and the assignment is dispatched when connectivity is restored

Business Value

Sending sensitive personal data (name, address, medical summaries) to peer mentors via phone calls or unencrypted messaging creates GDPR compliance risk and information quality issues. This story delivers a cryptographically secure dispatch channel that satisfies legal obligations for data protection, gives coordinators confidence that sensitive information is handled correctly, and replaces an unsustainable manual process for Blindeforbundet's home visit workflow.