platform-coop-toolkit / coop-map-directory-index

The Map/Directory/Index component of the Platform Cooperative Development Kit.
https://directory.platform.coop
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

feat: allow cancellation of profile creation, block flow if profile exists (fix #27, fix #143) #145

Closed greatislander closed 4 years ago

greatislander commented 4 years ago

Description

This PR adds functionality to the cancel button in individual and organizational profile flows, and blocks and redirects away from the individual profile creation flow if a user with a profile accesses it directly.

Steps to test

  1. Start individual and organizational profile creation.
  2. Cancel part way through.
  3. Create an individual profile.
  4. After it's created, navigate directly to /add/individual.

Expected behavior: Cancellation terminates flow and redirects to My Profiles. Visiting /add/individual when you already have a profile redirects to My Profiles and displays an error message to that effect.

Additional information

Related issues