-
Notifications
You must be signed in to change notification settings - Fork 100
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
Fetch products on login; add getProductAbbreviation
function
#406
Conversation
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.
If I'm understanding this correctly, we'll only fetch the products on login with this change so if (in the probably rare case, but possible) a product is added while a user has an active session, it could cause an issue? If that's correct, should we do another fetch if we don't find a product in the productArea service?
FWIW, this wouldn't be a new issue. Even in the current code, ProductAreas are only fetched once per session. I added a couple "refresh" calls to handle the case of new products being added. I think they make sense on the ProductSelect and SubscriptionList components but don't seem necessary for cosmetic stuff like avatars. |
Ah didn't realize that.
Cool, sounds good 👍 |
Moves the ProductAreaService's
fetch
call to the/authenticated
route and adds agetProductAbbreviation
utility method. We now fetch ProductAreas at the component level (e.g., ProductSelect, Settings), but since we're planning to use abbreviations in the ProductAvatar, it would be helpful to have these loaded on login.