Skip to content

fix(PM-1470): show applications count in tab #1135

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

Merged
merged 3 commits into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
<TabsNavbar
defaultActive={activeTab}
onChange={handleTabChange}
tabs={getCopilotDetailsTabsConfig(isAdminOrPM)}
tabs={getCopilotDetailsTabsConfig(isAdminOrPM, copilotApplications?.length || 0)}

Choose a reason for hiding this comment

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

The function getCopilotDetailsTabsConfig now takes an additional parameter. Ensure that this function is updated to handle the new parameter correctly and that all calls to this function throughout the codebase are updated accordingly.

/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ export enum CopilotDetailsTabViews {
applications = '1',
}

export const getCopilotDetailsTabsConfig = (isAdminOrPM: boolean): TabsNavItem[] => (isAdminOrPM ? [
export const getCopilotDetailsTabsConfig = (isAdminOrPM: boolean, count: number): TabsNavItem[] => (isAdminOrPM ? [

Choose a reason for hiding this comment

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

The function getCopilotDetailsTabsConfig now takes an additional parameter count, but it is not used within the function. Ensure that count is utilized appropriately to fulfill the purpose of showing applications count in the tab.

{
id: CopilotDetailsTabViews.details,
title: 'Details',
},
{
badges: [{
count,
type: 'info',
}],
id: CopilotDetailsTabViews.applications,
title: 'Applications',
},
Expand Down