Skip to content

Conversation

himaniraghav3
Copy link
Collaborator

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

@@ -291,12 +291,13 @@ const CopilotOpportunityDetails: FC<{}> = () => {
)
}
{activeTab === CopilotDetailsTabViews.details && <OpportunityDetails opportunity={opportunity} />}
{activeTab === CopilotDetailsTabViews.applications && isAdminOrPM && opportunity && (
{activeTab === CopilotDetailsTabViews.applications && opportunity && (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@@ -96,12 +97,18 @@ const CopilotApplications: FC<{

const tableData = useMemo(getData, [props.copilotApplications, props.members])

const visibleColumns = props.isAdminOrPM

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming visibleColumns to filteredColumns or userSpecificColumns for clarity, as it indicates that the columns are filtered based on user roles.

@@ -96,12 +97,18 @@ const CopilotApplications: FC<{

const tableData = useMemo(getData, [props.copilotApplications, props.members])

const visibleColumns = props.isAdminOrPM
? tableColumns
: tableColumns.filter(col => ![

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(...); }.

@himaniraghav3 himaniraghav3 merged commit b42bdc6 into dev Aug 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants