Closed alexjball closed 1 year ago
The profile page has some conditional rendering based on if the user is an org here
We'll need to authorize access to admin page data using some kind of server-side code. There are two options for this:
adminOperations
cloud function that only admins can call. It handles requests for listing, upgrading, etc. Call this on the client to load data for the tables and submit forms. For reference, Here is the cloud function and auth logic for publishing testimony. These use HTTPS Callables.getServerSideProps
. The benefit of this over 1 is it should simplify data fetching, as all of the page data is available immediately to the client, and it puts the data fetching logic closer to the page, so should be easier to iterate on. In order to use this approach, we need to pass the user's firebase auth token to the server and validate it. You can refer to the setup in this blog post. The important parts are setting persistence in step 1 and then doing the check step 6. You can see an example of server side rendering in maple here@tommagnusson Kelly is getting started on admin pages for signing up admins and organizations. We should be able to reuse this approach to build the admin pages for content moderation as well.
I wrote up the background for this epic in this google doc and will be putting running notes in the same place: https://docs.google.com/document/d/17lpl4ty79YQAFhX6akPWuk9w8WoOX2T9V5Wie7CEb2k/edit?usp=sharing
Dev will happen on this branch: https://github.com/jellyyams/maple/tree/orgprofiles
Great! Thanks Kelly. We’ll find a designer to pair with you. Much much appreciated!
On Tue, Feb 7, 2023 at 10:20 AM jellyyams @.***> wrote:
I wrote up the background for this epic in this google doc and will be putting running notes in the same place: https://docs.google.com/document/d/17lpl4ty79YQAFhX6akPWuk9w8WoOX2T9V5Wie7CEb2k/edit?usp=sharing
Dev will happen on this branch: https://github.com/jellyyams/maple/tree/orgprofiles
— Reply to this email directly, view it on GitHub https://github.com/codeforboston/maple/issues/927#issuecomment-1420952175, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARANGSFNE2VUUTMHXDRMXYLWWJR4VANCNFSM6AAAAAAURG2OSE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Front end tasks:
Back end tasks:
Awesome! So we need to get you front end support to finish this up?
Thanks Matt
On Tue, Mar 7, 2023 at 1:42 PM jellyyams @.***> wrote:
Front end tasks:
- Profiles can be displayed as an org or a regular user
- Update sign up flow to allow users to select profile type (org or individual) at the beginning of sign up flow
- Add banner/notification for profiles that are awaiting admin approval for org accounts
Back end tasks:
- Set up api endpoints for serving data to admin view
- integrate api endpoints with react admin
— Reply to this email directly, view it on GitHub https://github.com/codeforboston/maple/issues/927#issuecomment-1458653376, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARANGSCLHZFW2LMIW6H5M2TW256SBANCNFSM6AAAAAAURG2OSE . You are receiving this because you commented.Message ID: @.***>
I think i'm able to finish up the front end tasks for this epic without additional support. We do however need people who are good at front end dev to clean up some of the existing pages. A lot of the styling is inconsistent across different pages or deviate from the designs that the ux team came up with. The site doesn't look super clean atm
Versioned Figma designs
Support for roles was added in #611 . Spefically, the setRole function is available in cloud functions to adjust the role of a user