-
Notifications
You must be signed in to change notification settings - Fork 16
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
Read-only access for project list webpart #498
Conversation
…x and toggle + conditional rendering
@Rundez Have you installed this somewhere for testing? |
@olemp I have only served it in my own dev environment. |
@Rundez can we setup a separate instance of pp365 in our demo tenant and share for testing? Seems like something that should be thoroughly tested |
@tarjeieo I am setting one up. |
Created a PP instance at this site. |
* Added opacity and alert message to ReadOnly projects (Frontpage) * Removed alert message and added tooltip and cursor to ReadOnly projects * Using title html attribute Co-authored-by: Ole Martin Pettersen <olemp@puzzlepart.com>
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.
Most looks good, but I don't understand the logic 100%.
What does the "Vis alle prosjekter" toggle do? And how is it related to "Flisevisning"?
Is it the toggle in web part properties that decides whether to show the "Mine prosjekter/Alle prosjekter" links? I don't find that so intuitive. Do we need a webpart property to toggle this option?
Also, we need to change the placeholder based on what "view" is selected.
Ah yes - it is not related to "Flisevisning" actually. As you said, it decides wether the links are displayed. It might be unnecessary, or it could be moved to another submenu in project properties. I agree with the placeholders. As I removed the function that checks for deleted projects the problem occured. It did only occur on projects in the project list that actually is deleted? I will create a fix. |
Having a little isuse. While testing at https://puzzlepart.sharepoint.com/sites/pp365. |
loading: true, | ||
searchTerm: '', | ||
showAsTiles: props.showAsTiles, | ||
onlyAccessProjects: true |
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.
Is onlyAccessProjects
used like a prop @Rundez? Seems like it's hardcoded to true
? Don't see the point of this state variable, but I might be missing something.
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.
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.
@Rundez My Projects will only show projects the user is a member of any way, so I don't see the need for this property?
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.
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.
How is readOnly
set, and where?
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.
It is set in the constructor of the ProjectListModel.
Used in the _mapProjects function in data/index.tsx
) | ||
|
||
if (!this.state.onlyAccessProjects) | ||
projects = projects.filter((project) => project.readOnly === false) |
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.
@Rundez Where is readOnly
property set?
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.
See comments above.
What is happening exactly? Seems to work here. |
If it's over 20 projects, the project logo fetch is batched. It seems like that creates the issue. Not completely sure why it's happening though. |
This might solve the issue. |
Works like charm! |
Your checklist for this pull request
Description
Added the possibility to see all projects when the user is in the "Porteføljeinnsyn" group. This can be toggled on and off in the projectlist web part. If it is toggled on, the user(s) in "Porteføljeinnsyn" will notice additional buttons appear right of the search bar. These buttons will change the current view, toggling between seeing all projects, and projects that the user is a member of.
How to test
Disclaimer:
Deleted projects will be shown if "All projects" is selected. A solution is will be delivered in a separate PR.
Relevant issues (if applicable)
closes #443
💔Thank you!