-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat(organizations): hide organization fields from settings for mmo organizations - TASK-978 #5280
base: main
Are you sure you want to change the base?
Conversation
@pauloamorimbr This isn't an issue with your code, but I am concerned about the way we are submitting the PATCH request in this form. It looks to me like we are basically just always sending the data for every form field. It's a PATCH request but we're essentially treating it like a PUT. This gets uglier as a result of the changes we are making here: Now we are submitting the org detail fields even though we aren't displaying them. At the very least, I believe we need to stop submitting org data this way. If it didn't take too long, I would say it would be better if we only submitted data for "dirty" form fields (ones that have been edited by the user). But if that second goal is going to take too long perhaps we can ignore that for the moment. Can you spend 20 minutes or so to determine what the best approach is here? |
634da71
to
aa22083
Compare
After the refactors in #5303 and #5290, I'm back here. Now this behaves the proper way, like you commented, sending only the edited fields to the PATCH call, thus not sending organization data when the organization is MMO since the fields are not visible for editing. |
|
||
const organization = orgQuery.data; | ||
|
||
// We will not display organization fields if it's and MMO organization |
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.
Typo: should be "an MMO organization".
It might be more accurate to say "We will not display organization fields if user is a member of an MMO ..."
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.
Left one minor comment. Other than that, lgtm
🗒️ Checklist
<type>(<scope>)<!>: <title> TASK-1234
frontend
orbackend
unless it's global📣 Summary
Organization fields are not displayed anymore in setting screens for MMOs.
👀 Preview steps
Feature/no-change template:
/#/account/settings
?ff_mmoEnabled=true
?ff_mmoEnabled=false
💭 Notes
The 'organization', 'organization_type' and 'organization_website' are now being hidden when the current organization has the
is_mmo
flag.