Skip to content
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

Merged
merged 9 commits into from
Apr 8, 2024
Merged

create invitation presenter #1772

merged 9 commits into from
Apr 8, 2024

Conversation

apoorv1316
Copy link
Collaborator

Why

lastName: invitation.last_name,
email: invitation.recipient_email,
role: invitation.role,
status: "INVITATION PENDING",
Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Contributor

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.


I18n.t("team.invitation")
def invited_user_status(member)
user_employed_at_current_company && member.accepted_at
Copy link
Contributor

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
Copy link
Contributor

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

@apoorv1316 apoorv1316 force-pushed the invitation-presenter branch from a7d8f3e to 958a4f9 Compare April 8, 2024 08:47
@apoorv1316 apoorv1316 merged commit f60a0ec into develop Apr 8, 2024
1 check passed
@apoorv1316 apoorv1316 deleted the invitation-presenter branch April 8, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants