Add route to fulfill invites
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- authentication, frontend
Direzione di ricerca
Inizia risolvendo il percorso della route in questo issue, quindi esamina il form di signup esistente, il routing dell’app e l’adapter degli utenti. Usa Mirage mentre la dipendenza dall’API è in sospeso. Il lavoro è completo quando la route gestisce gli inviti mancanti, semplici e di progetto, crea l’utente con l’ID dell’invito e dispone di coverage di acceptance e integrazione per i casi elencati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 120
- Fork
- 75
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di code-corps/code-corps-ember
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
code-corps/code-corps-ember#1616 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
code-corps/code-corps-ember#1613 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
code-corps/code-corps-ember#1063 · 1 reazione ·
-
greenkeeper
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
code-corps/code-corps-ember#1765 · 1 commento ·
Tutte le issue di code-corps/code-corps-ember
Issue simili
-
bug confirmed issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
open-webui/open-webui#30750 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100