-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Extra information on Profile #974
Comments
For this one IMO we should add new fields in the user model : |
Yep definitely agree with you that we need to keep specific counters for these things rather than calculating each time. I would suggest however instead of adding a lot more to the user profile we store the info either in a single I also think we should move the logic away from individual pages/stores (e.g. update when a user clicks to create a howto), to the database itself via triggers (i.e. when new entry is detected under howtos, read the |
Agree with the
You mean we will then create a firebase function that will update |
Exactly, so nothing needed to be called manually from the user on the webpage (which is much more prone to error), and nothing required in main platform code (all be within the functions instead) |
Hello DB trigers for updating count when new howto/event are ready, now I will go for the display. What are your tougths on data for the frontend: Extend user model Note: I remember that last time I added fields to a model It caused trouble with the caching system and it would trigger big dta updates |
In case of the first is possible I have PR ready |
Shows information on user profile - [x] Location with link to map pin - [x] Accepted HowTos - [x] Accepted Events User stats are computed via firebase function triggered by database changes
Thanks updated |
I've made a few changes to the code to also keep track of draft/pending as well as specific ids of events/howtos in the stats as it's cleaner from a dev perspective and figure could be useful in the future. @davehakkens - by default this shows the counts for both approved and pending howtos or events, is there a strong preference to have the number only indicate approved (one line of code to filter if that's the case), or ok to include both? |
no strong preference. Including draft/pending count for how-to's is also good. (there are very little of those anyway) |
Component infos
Description
In the profiles we need some additional information in a sidebar
Map pin: Show if profile has map pin (and link to pin. )
How-to: Show amount of how-to's created by this profile (all approved ones)
Events: Show amount of events created by this profile (all approved ones)
Page related
Will be used in :
Profiles
Mockup
The text was updated successfully, but these errors were encountered: