Skip to content

Commit

Permalink
Merge pull request #697 from OneCommunityGlobal/vishala_lb_view_hotfix
Browse files Browse the repository at this point in the history
Leaderboard View for Admins Hotfix
  • Loading branch information
one-community authored Jan 11, 2024
2 parents 0d9e52a + b03f597 commit 52cb753
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions src/helpers/dashboardhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,46 +223,8 @@ const dashboardhelper = function () {
)
.then((res) => res)
.catch((e) => {});
} else if (userRole == "Administrator") {
// All users except Owner and Core Team
const excludedRoles = ["Core Team", "Owner"];
teamMembers = await userProfile
.find(
{ isActive: true, role: { $nin: excludedRoles } },
{
role: 1,
firstName: 1,
lastName: 1,
isVisible: 1,
weeklycommittedHours: 1,
weeklySummaries: 1,
timeOffFrom: 1,
timeOffTill: 1,
}
)
.then((res) => res)
.catch((e) => {});
} else if (userRole == "Administrator") {
// All users except Owner and Core Team
const excludedRoles = ["Core Team", "Owner"];
teamMembers = await userProfile
.find(
{ isActive: true, role: { $nin: excludedRoles } },
{
role: 1,
firstName: 1,
lastName: 1,
isVisible: 1,
weeklycommittedHours: 1,
weeklySummaries: 1,
timeOffFrom: 1,
timeOffTill: 1,
}
)
.then((res) => res)
.catch((e) => {});
} else {
// 'Core Team', 'Owner' //All users
// 'Core Team', 'Owner' , 'Admin' //Show All users
teamMembers = await userProfile
.find(
{ isActive: true },
Expand Down

0 comments on commit 52cb753

Please sign in to comment.