-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create invitation presenter #1772
Conversation
lastName: invitation.last_name, | ||
email: invitation.recipient_email, | ||
role: invitation.role, | ||
status: "INVITATION PENDING", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of status value sending from the backend, let frontend use the whatever message they want to display. Its better to send the key accepted_at
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shruti asked me to send the same keys that are use in GET requests for teams. LMK if we have to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For status, we have to use accepted_at
. On the frontend, they can display any message as the messages keep on changing.
fcefdd0
to
cd6149a
Compare
app/presenters/team_presenter.rb
Outdated
|
||
I18n.t("team.invitation") | ||
def invited_user_status(member) | ||
user_employed_at_current_company && member.accepted_at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use accepted_at?
return boolean
json.last_name invitation.last_name | ||
json.email invitation.recipient_email | ||
json.role invitation.role | ||
json.status invitation.accepted_at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use accepted_at?
returns boolean
a7d8f3e
to
958a4f9
Compare
Why