Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/components/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from '~/utils/constants';
import { cantUpdateDevAdminDetails } from '~/utils/permissions';
import '../../App.module.css';
import FeedbackModal from '../FeedbackModal/FeedbackModal';
import Leaderboard from '../LeaderBoard';
import SummaryBar from '../SummaryBar/SummaryBar';
import Timelog from '../Timelog/Timelog';
Expand Down Expand Up @@ -70,7 +71,7 @@ export function Dashboard(props) {

return (
<Container fluid className={darkMode ? 'bg-oxford-blue' : ''}>
{/* <FeedbackModal /> */}
<FeedbackModal />
<SummaryBar
displayUserId={displayUserId}
toggleSubmitForm={toggle}
Expand Down
5 changes: 0 additions & 5 deletions src/components/FeedbackModal/FeedbackModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,13 @@
// Validate that all filled member names are valid users from the list
const allUsers = [...activeUsers, ...inactiveUsers];

const invalidActive = ratedMembers.find(m => isValidMemberName(m, allUsers));

Check warning on line 104 in src/components/FeedbackModal/FeedbackModal.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `.some(…)` over `.find(…)`.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AaCicC_d6Oy9QXxqABBg&open=AaCicC_d6Oy9QXxqABBg&pullRequest=5549
const invalidInactive = inactiveRatedMembers.find(m => isValidMemberName(m, allUsers));

Check warning on line 105 in src/components/FeedbackModal/FeedbackModal.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `.some(…)` over `.find(…)`.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AaCicC_d6Oy9QXxqABBh&open=AaCicC_d6Oy9QXxqABBh&pullRequest=5549

if (invalidActive || invalidInactive) {
toast.warn('Please select valid members from the dropdown only.');
return;
}
console.log('allUsers:', allUsers);
console.log('ratedMembers:', ratedMembers);
console.log('invalidActive:', invalidActive);
console.log('invalidInactive:', invalidInactive);

setIsSubmitting(true);

try {
Expand Down
1 change: 1 addition & 0 deletions src/utils/URL.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const ENDPOINTS = {
`${APIEndpoint}/dashboard/leaderboard/trophyIcon/${userId}/${trophyFollowedUp}`,

// Questionnaire endpoints
QUESTIONNAIRE_CHECK_MODAL: userId => `${APIEndpoint}/dashboard/questionaire/checkModal/${userId}`,
QUESTIONNAIRE_FEEDBACK_REQUEST: () => `${APIEndpoint}/dashboard/questionaire/feedbackrequest`,
QUESTIONNAIRE_CLOSE_PERMANENTLY: () =>
`${APIEndpoint}/dashboard/questionaire/checkUserFoundHelpSomewhere`,
Expand Down
Loading