Skip to content

Add user withdrawal feature #2834

Description

@NamFra

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.

Currently, users cannot exercise their right of withdrawal directly from the interface, as required by Decree No. 2026-3. Users must manually download a PDF form, which is no longer compliant. Additionally, the withdrawal deadline is not visible, which can be misleading.


Describe the solution you'd like

1. Button display rules and deadline

has_waived_withdrawal_right Trainings (credentials) Certificates
True (✅ checked) Do not display Display (hidden after expiration or use)
False (❌ unchecked) Display (hidden after expiration or use) Display (hidden after expiration or use)

Important notes:

  • The withdrawal period (approx. 16 days to match 14 business days) is calculated on Joanie's side (payment_schedule.py).
  • The button is hidden after expiration or after the user has requested withdrawal.
  • For batch orders, the withdrawal button is never displayed.

Location:

  • Credentials: In the order details (/dashboard/courses/orders/{id}).

    • Mockup for inspiration:
      Image
  • Certificates: On the dashboard (/dashboard/courses).

    • Mockup for inspiration:
      Image

Button label:

  • Credentials: "Withdraw"
  • Certificates: "I wish to withdraw"

Withdrawal deadline display:

  • Credentials:
    You can cancel your contract until [date] at [time].

  • Certificates:
    If you have not yet accessed the exam, you can exercise your right of withdrawal until [date] at [time].

💡 The above labels can be modified/refined.


2. Confirmation modal

Content:

  • Pre-filled information:

    • First name, last name, email (editable via Keycloak)
    • Title and reference of the training program/course with certificate
    • Order reference
  • Actions:

    • Primary button: "I confirm my withdrawal request"
    • Secondary link: "Please update your account" (redirects to the user profile in Keycloak)
  • Behavior:

    • Opens when clicking the button
    • After confirmation: "Your request has been successfully recorded. A confirmation email has been sent."

Mockup for inspiration:
Image


3. Error handling

Messages to include:

  • Expired deadline: "The withdrawal period for this order has expired."
  • Error: "An error occurred. Please try again or contact support."

Discovery, Documentation, Adoption, Migration Strategy

Display of cancelled orders by users: if cancelled orders due to retraction have a distinct status, this status should be visible in the unfiltered list of contracts in Richie. This will allow organizations to easily track and identify cancelled orders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions