-
Notifications
You must be signed in to change notification settings - Fork 93
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
Bug : Incorrect Portfolio link #155
Comments
@Rahulm2310 can you confirm if the URL is working or not means does it takes you to the right place, cuz in the code I see |
@Aaishpra Currently the URL is contains |
@Aaishpra both the links get redirected to home page.
|
Oh I see, Thanks for pointing it out 🤔. Although the member portfolio page is still under construction but the URL should work. @mtreacy002 what do you think about this? |
@Rahulm2310 and @Aaishpra . Ideally, we would like to have user (e.g. user A) to see the portfolio page of another member (e.g. User B), not the profile page, when user A click on that user B's name from the members list (on the |
@mtreacy002 If I am not wrong, isn't there a route like http://localhost:3000/members/profile/userb for visiting a user' s profile.
Yes, I agree. |
Completely agree with you on the routing part. @mtreacy002 Cc @mtreacy002 |
@Rahulm2310 , the route you're referring to is only a temporary route since we don't have the portfolio page ready yet. We currently do have MemberPortfolio component for this (Portfolio page), but it hasn't been utilised since it doesn't have the minimum information to accept/pass props to the next page. We need to construct this MemberPortfolio so we can direct user from the Members list (Members page) to the Portfolio's page (which what should happen - our goal). Then from there (Portfolio page), we can direct user to the Profile page. That means, once the MemberPortfolio component ready with this basic function, we will have the following routings:
So, I agree with @Aaishpra comment, ...
... we can put this issue on hold and open an issue for making the Portfolio page (MemberPortfolio component) ready then revisit this issue with a cleaner url path. What do you all think? |
+1 from my side @mtreacy002 the portfolio needs to be created first. |
Ok, then let's first create the Portfolio page and then get back to this 👍 |
@Rahulm2310, I've rethink this over, and feel like we can just use the existing Portfolio template (component) for this purpose. At the moment, when user click I'll make this issue available now. |
@mtreacy002 Thanks! I would like to pick it up. Please assign me 🙂
What should be shown in place of |
It needs to show the name of the user, e.g. |
@mtreacy002 agreed. Thanks for clarifying 😊 |
@mtreacy002 I see two components namely |
@Rahulm2310 , in that case you can direct the call from 'Members' to 'MemberPortfolio' and the one from 'My Space' to 'Portfolio'. Remember to give relevant buttons/links on this templates for the next actions, e.g. :
Later once we completed the feature for creating/accepting mentoring program relation, we can put the programs that portfolio owner had worked/currently working on as active links. |
@mtreacy002 Should a user be allowed to view another user's personal details ?
How can I check if a user is a org representative ? By fetching |
@Rahulm2310, The BridgeInTech Admin user can see user's personal information, but for other users, only those who are an organization representative can. This is because they might need to contact potential mentor/mentee /via email/phone, check out the organization that user is working at, check the personal background of that user if they have a program targeting specific background, etc. Normal users should not have access to these info.
1st point:
IMO, both approach will have its plus and minus, but if have to choose, I'd go with option 1. 2nd point:
Yes, for this one you need to send the GET /organization call to BIT backend. Tips: You might have to consider how to keep the info returned by this call persistent for the logged in user as few pages will require this info (e.g. organisation rep has different level of permission to other user's personal info as I mentioned at the beginning of this post). So, making it persistent will help remove the need for making the same request again and again. |
@mtreacy002 In case when a logged in user visits their profile, We can show buttons on the Profile page for going to
Actually, the url looks weird to a person visiting his own profile. We can use the same component to render, but should use different routes like for logged in user's own profile, it should be
For this, I was thinking of creating a context similar to |
The logic for the button "Go to Portfolio" on the MemberPortfolio page should check the user identity and role:
Makes sense. Ok, let's go with that 👍
perhaps we can use the existing |
@mtreacy002 Sure, for now we don't need a seperate context for organization. Will save the org data in the existing One more thing is that, we have routes Also, currently we are showing input forms in We need not to show these inputs and directly show the values when a representative visit's user's personal-details. For that either we need to create a seperate page or render the form conditionally based on if user visiting his own profile or representative visiting a candidate's profile. Does this makes sense ? |
@Rahulm2310 the logic above totally make sense 👍 . Please do go ahead with it. |
@mtreacy002 As we send access_token to the backend to fetch personal-details, additional-information, personal background, we can only get logged in user's details. I think we don't have routes setup in the backend for a representative requesting a user's additional-information, personal background. Do we ? |
@Rahulm2310 , yes, the request to additional info and personal background should be made to BIT endpoint 😉. Only the personal details need to be sent to MS backend. |
@mtreacy002 I meant that currently we can request personal-details, additional-information, personal-background for current user (using access_token). How can someone else (an org representative) another user's personal-details, additional-information, personal-background. Don't we need to create endpoints for that at backend somewhat like |
I see your point now, @Rahulm2310. Yes, agree. We should create endpoints for that just as you stated above. Can you please open 2 separate issues on those endpoints? I Really appreciate you brought this up. |
@mtreacy002 Sure, will do that 👍 |
@mtreacy002 Should we put this on hold until the endpoints gets created at backend. |
Ok. Will do that 😉 |
hi @mtreacy002 , is this issue open ? |
It's still on hold , if you wish to propose a way to solve this, write it here. cc @mtreacy002 |
Hi @naveen8801, we need the endpoints |
@naveen8801 , the issue #215 that @Rahulm2310 mentioned above is still waiting for contributors to claim it. Would you be interested to wok on it? |
sure @mtreacy002 , |
Describe the bug
When visiting a member's profile, if we click on "Go to Portfolio" button (link) , it's href is set with a incorrectly formatted member portfolio url.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be correctly formatted.
Screenshots
The button currently goes to http://localhost:3000/members/profile/"/members/portfolio/rmohata" whereas it should go to http://localhost:3000/members/portfolio/rmohata
Desktop (please complete the following information):
I would like to take up and fix this issue.
The text was updated successfully, but these errors were encountered: