Add route to fulfill invites
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
首先解析此 issue 中的 route path,然后检查现有的 signup form、app routing 和 user adapter。在 API 依赖尚未就绪期间使用 Mirage。完成的标准是:route 能处理缺失的、普通的和项目邀请,使用邀请 ID 创建用户,并且为列出的情况提供 acceptance 和 integration 覆盖。
由索引模型根据 Issue 内容生成。
描述
Problem
We need a route (at a path to be decided on here) which will be used to claim a user invite
Subtasks
- Decide on path for the route through discussion in this issue
- Add route to app
- Loads invite, has a 404/not_found substate
- Displays different informational UI depending on the invite being for a project or just a plain invite
- Displays form UI for user account creation - mostly the same as the signup form
- When creating the user, add invite ID to the new user payload
- Write acceptance test for success case for a plain invite
- [ ] Write acceptance test for success case for a project invite
- [ ] Write fail case for an invite not found
- [ ] Write any integration tests for components added as part of the solution
Notes
How to specify an invite id
-
We could add the invite id as a virtual attribute and push it as part of the payload. Would require a virtual attribute API side as well
-
We could ad a
hasMany('claimed-invites')to the user model, since the API already has it, then push the loaded invite into the association and save that way. Should end asclaimed_invite_idson the API, but would require rewriting our API approach slightly -
My prefered approach
- save a plain user, but when calling save, specify
user.save({ inviteId: userInvite.id }) - modify user adapter by overriding
- save a plain user, but when calling save, specify
urlForCreateRecord(modelName, snapshot) {
if (snapshot.inviteId) {
return this._super(...arguments) + `?invite_id=${snapshot.inviteId}`
} else {
return this._super(...arguments);
}
}
This way, we keep the create "switch" separate from the create attributes, since it becomes a query param. At the same time, the API should keep working.
References
Requires code-corps/code-corps-api#1351 merged, but can be worked on using mirage in the interim.
- 主要语言
- JavaScript
- 星标
- 120
- 派生
- 75
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
code-corps/code-corps-ember 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
code-corps/code-corps-ember#1616 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
code-corps/code-corps-ember#1613 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
难度 2/5 1-3 小时 新手友好度 62/100
code-corps/code-corps-ember#1063 · 1 个 reaction ·
-
greenkeeper
难度 3/5 1-2 天 新手友好度 25/100
code-corps/code-corps-ember#1765 · 1 条评论 ·
查看 code-corps/code-corps-ember 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100
-
Issue-Bug
难度 2/5 1-3 小时 新手友好度 68/100
sugarlabs/musicblocks#8924 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled 未关闭customer-eng status: needs triage
难度 2/5 1-3 小时 新手友好度 84/100