You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,68 @@ This is the frontend application for creating and managing challenges.
29
29
Production configuration is in `config/constants/production.js`
30
30
Development configuration is in `config/constants/development.js`
31
31
32
+
## Project Invitation Flow
33
+
34
+
### Route handled
35
+
36
+
`/projects/:projectId/invitation/:action?`
37
+
38
+
Handled by `ProjectInvitations` container (`src/containers/ProjectInvitations/index.js`).
39
+
40
+
### Email link format
41
+
42
+
When `projects-api-v6` sends an invite email to a **known user** (existing Topcoder account), the email contains two action buttons whose links must use this exact format:
-`{WORK_MANAGER_URL}` is the `WORK_MANAGER_URL` env var configured in `projects-api-v6`.
50
+
- The `?source=email` query parameter is forwarded in the `PATCH /v6/projects/{projectId}/invites/{inviteId}` body as `{ status, source }`.
51
+
52
+
### Automatic action behaviour
53
+
54
+
When a user clicks either link and lands on the route with `:action` set, `ProjectInvitations` automatically calls `updateProjectMemberInvite` without showing the confirmation modal. After success it redirects to:
55
+
56
+
-`accepted` → `/projects/{projectId}/challenges`
57
+
-`refused` → `/projects`
58
+
59
+
### Manual (modal) flow
60
+
61
+
When the route is accessed **without** an `:action` segment (e.g., navigating directly to `/projects/{projectId}/invitation`), the container shows a `ConfirmationModal` with **Join project** / **Decline** buttons.
62
+
63
+
### API call made
64
+
65
+
Both flows call `PATCH /v6/projects/{projectId}/invites/{inviteId}` via `updateProjectMemberInvite` in `work-manager/src/services/projectMemberInvites.js`, with body `{ status: 'accepted' | 'refused', source?: 'email' }`.
66
+
67
+
### Env var cross-reference
68
+
69
+
`WORK_MANAGER_URL` is documented in the `projects-api-v6` README under Environment Variables. Ensure it is set to the deployed work-manager origin (no trailing slash), e.g.:
0 commit comments