PM-1612 Update visible columns on copilot applications#1185
PM-1612 Update visible columns on copilot applications#1185himaniraghav3 merged 1 commit intodevfrom
Conversation
| } | ||
| {activeTab === CopilotDetailsTabViews.details && <OpportunityDetails opportunity={opportunity} />} | ||
| {activeTab === CopilotDetailsTabViews.applications && isAdminOrPM && opportunity && ( | ||
| {activeTab === CopilotDetailsTabViews.applications && opportunity && ( |
There was a problem hiding this comment.
The isAdminOrPM prop is being passed to CopilotApplications, but the condition isAdminOrPM has been removed from the check for rendering this component. Ensure that the logic for selectively visible columns is correctly implemented within CopilotApplications based on this prop.
|
|
||
| const tableData = useMemo(getData, [props.copilotApplications, props.members]) | ||
|
|
||
| const visibleColumns = props.isAdminOrPM |
There was a problem hiding this comment.
Consider renaming visibleColumns to filteredColumns or userSpecificColumns for clarity, as it indicates that the columns are filtered based on user roles.
|
|
||
| const visibleColumns = props.isAdminOrPM | ||
| ? tableColumns | ||
| : tableColumns.filter(col => ![ |
There was a problem hiding this comment.
The filter logic could be extracted into a separate function for better readability and maintainability. For example, const getVisibleColumns = (isAdminOrPM, columns) => { return isAdminOrPM ? columns : columns.filter(...); }.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/PM-1612
What's in this PR?
The Applications tab is now visible to all
The columns however have been made selectively visible to Admins/PMs