diff --git a/webiu-server/controllers/contributorController.js b/webiu-server/controllers/contributorController.js index d40a696..e637083 100644 --- a/webiu-server/controllers/contributorController.js +++ b/webiu-server/controllers/contributorController.js @@ -11,6 +11,8 @@ const getAllContributors = async (req, res) => { let finalResponse = {}; const orgName = 'c2siorg'; const repositories = await fetchRepositories(orgName); + console.log(repositories); + if (!repositories) { return res.status(500).json({ error: 'Failed to fetch repositories' }); diff --git a/webiu-ui/src/app/page/contributor-search/contributor-search.component.html b/webiu-ui/src/app/page/contributor-search/contributor-search.component.html index 8390646..31d3c43 100644 --- a/webiu-ui/src/app/page/contributor-search/contributor-search.component.html +++ b/webiu-ui/src/app/page/contributor-search/contributor-search.component.html @@ -1,27 +1,31 @@ -
+
-
+

Filter by repo

@@ -29,9 +33,16 @@
- +

No issues or pull requests found for this contributor. diff --git a/webiu-ui/src/app/page/contributor-search/contributor-search.component.scss b/webiu-ui/src/app/page/contributor-search/contributor-search.component.scss index 2a3af90..350c272 100644 --- a/webiu-ui/src/app/page/contributor-search/contributor-search.component.scss +++ b/webiu-ui/src/app/page/contributor-search/contributor-search.component.scss @@ -298,5 +298,6 @@ font-size: 0.7rem; } } - - +.hidden{ + display: none; +} \ No newline at end of file diff --git a/webiu-ui/src/app/page/contributor-search/contributor-search.component.ts b/webiu-ui/src/app/page/contributor-search/contributor-search.component.ts index 49a2ae1..7713b0a 100644 --- a/webiu-ui/src/app/page/contributor-search/contributor-search.component.ts +++ b/webiu-ui/src/app/page/contributor-search/contributor-search.component.ts @@ -116,4 +116,10 @@ export class ContributorSearchComponent { const updatedAt = new Date(date); return formatDistanceToNow(updatedAt, { addSuffix: true }); } + get hasData(): boolean { + return this.filteredIssues.length > 0 || this.filteredPullRequests.length > 0; + } + } + + diff --git a/webiu-ui/src/app/page/contributors/contributors.component.html b/webiu-ui/src/app/page/contributors/contributors.component.html index 6f7a033..1fa8b08 100644 --- a/webiu-ui/src/app/page/contributors/contributors.component.html +++ b/webiu-ui/src/app/page/contributors/contributors.component.html @@ -1,4 +1,3 @@ -

@@ -16,7 +15,7 @@
- filter by repository + Filter by repository
- +
- - - -
@for (profile of displayProfiles; track $index) { - - - }
-
\ No newline at end of file +

+ No contributors found matching the search criteria. +

+ diff --git a/webiu-ui/src/app/page/contributors/contributors.component.scss b/webiu-ui/src/app/page/contributors/contributors.component.scss index 70d40ab..c1755de 100644 --- a/webiu-ui/src/app/page/contributors/contributors.component.scss +++ b/webiu-ui/src/app/page/contributors/contributors.component.scss @@ -259,3 +259,9 @@ } +.no-contributors-message { + text-align: center; + color: #888; + font-size: 1.2em; + margin-top: 20px; +}