diff --git a/server/src/main/java/com/objectcomputing/checkins/services/pulseresponse/PulseResponse.java b/server/src/main/java/com/objectcomputing/checkins/services/pulseresponse/PulseResponse.java index 1b59be5c40..e77145fd4d 100644 --- a/server/src/main/java/com/objectcomputing/checkins/services/pulseresponse/PulseResponse.java +++ b/server/src/main/java/com/objectcomputing/checkins/services/pulseresponse/PulseResponse.java @@ -77,7 +77,7 @@ public class PulseResponse { protected PulseResponse() { } - public PulseResponse(UUID id, Integer internalScore, Integer externalScore, LocalDate submissionDate, @Nullable UUID teamMemberId, String internalFeelings, String externalFeelings) { + public PulseResponse(UUID id, Integer internalScore, @Nullable Integer externalScore, LocalDate submissionDate, @Nullable UUID teamMemberId, String internalFeelings, String externalFeelings) { this.id = id; this.internalScore = internalScore; this.externalScore = externalScore; diff --git a/web-ui/src/components/admin/users/Users.jsx b/web-ui/src/components/admin/users/Users.jsx index e55ffc8d1b..9692289567 100644 --- a/web-ui/src/components/admin/users/Users.jsx +++ b/web-ui/src/components/admin/users/Users.jsx @@ -10,7 +10,7 @@ import AdminMemberCard from '../../member-directory/AdminMemberCard'; import MemberModal from '../../member-directory/MemberModal'; import { createMember, - reportAllMembersCsv + reportSelectedMembersCsv } from '../../../api/member'; import { AppContext } from '../../../context/AppContext'; import { UPDATE_MEMBER_PROFILES, UPDATE_TOAST } from '../../../context/actions'; @@ -110,7 +110,8 @@ const Users = () => { }); const downloadMembers = async () => { - let res = await reportAllMembersCsv(csrf); + const res = await reportSelectedMembersCsv( + normalizedMembers.map((m) => m.id), csrf); if (res?.error) { dispatch({ type: UPDATE_TOAST, diff --git a/web-ui/src/components/pulse/Pulse.css b/web-ui/src/components/pulse/Pulse.css index 4fc7240f9e..fb73042e5a 100644 --- a/web-ui/src/components/pulse/Pulse.css +++ b/web-ui/src/components/pulse/Pulse.css @@ -20,6 +20,10 @@ margin-bottom: 1rem; padding: 1rem; } + + .title-row { + display: flex; + } } :root[data-mui-color-scheme='dark'] { diff --git a/web-ui/src/components/pulse/Pulse.jsx b/web-ui/src/components/pulse/Pulse.jsx index 379942c6d8..9fc22ad32f 100644 --- a/web-ui/src/components/pulse/Pulse.jsx +++ b/web-ui/src/components/pulse/Pulse.jsx @@ -30,6 +30,7 @@ const tooltips = [ const propTypes = { comment: PropTypes.string, commentRequired: PropTypes.bool, + iconRequired: PropTypes.bool, score: PropTypes.number, setComment: PropTypes.func, setScore: PropTypes.func, @@ -38,13 +39,17 @@ const propTypes = { const Pulse = ({ comment, commentRequired, + iconRequired, score, setComment, setScore, title }) => (
- {title} +
+ {title} + {iconRequired && *} +
{icons.map((sentiment, index) => ( @@ -52,7 +57,7 @@ const Pulse = ({ aria-label="sentiment" className={index === score ? 'selected' : ''} data-testid={`score-button-${index}`} - onClick={() => setScore(index)} + onClick={() => setScore(score == index ? null : index)} sx={{ color: colors[index] }} > {sentiment} @@ -70,7 +75,7 @@ const Pulse = ({ }} placeholder="Comment" required={commentRequired} - rows={4} + maxRows={4} value={comment} />
diff --git a/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap b/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap index 63e99f560f..663e3ad4d4 100644 --- a/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap +++ b/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap @@ -6,11 +6,15 @@ exports[`renders correctly 1`] = `
-
- How are you feeling about work today? (*) -
+
+ How are you feeling about work today? (*) +
+
@@ -203,7 +207,6 @@ exports[`renders correctly 1`] = ` class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMultiline css-1sqnrkk-MuiInputBase-input-MuiOutlinedInput-input" id=":r5:" placeholder="Comment" - rows="4" style="height: 0px; overflow: hidden;" > Just testing diff --git a/web-ui/src/components/volunteer/VolunteerEvents.jsx b/web-ui/src/components/volunteer/VolunteerEvents.jsx index 66256fda76..92a12f58d6 100644 --- a/web-ui/src/components/volunteer/VolunteerEvents.jsx +++ b/web-ui/src/components/volunteer/VolunteerEvents.jsx @@ -258,7 +258,7 @@ const VolunteerEvents = ({ forceUpdate = () => {}, onlyMe = false }) => { - option === 'new' ? 'Create a New Organization' : (relationshipMap[option]?.organizationId && organizationMap[relationshipMap[option].organizationId]?.name) || 'Unknown' + option === 'new' ? 'Create a New Organization' : (relationshipMap[option]?.organizationId && organizationMap[relationshipMap[option].organizationId]?.name) || '' } options={['new', ...relationships.filter((rel) => !rel.endDate).map((rel) => rel.id)]} // Use relationship IDs onChange={(event, value) => { diff --git a/web-ui/src/pages/PulsePage.jsx b/web-ui/src/pages/PulsePage.jsx index ef6877f019..e9a247c1cf 100644 --- a/web-ui/src/pages/PulsePage.jsx +++ b/web-ui/src/pages/PulsePage.jsx @@ -42,16 +42,9 @@ const PulsePage = () => { const [year, month, day] = pulse.submissionDate; setSubmittedToday( year === now.getFullYear() && - month === now.getMonth() + 1 && - day === now.getDate() + month === now.getMonth() + 1 && + day === now.getDate() ); - - setInternalComment(pulse.internalFeelings ?? ''); - setExternalComment(pulse.externalFeelings ?? ''); - setInternalScore(pulse.internalScore == undefined ? - center : pulse.internalScore - 1); - setExternalScore(pulse.externalScore == undefined ? - center : pulse.externalScore - 1); }, [pulse]); const loadTodayPulse = async () => { @@ -91,7 +84,7 @@ const PulsePage = () => { const myId = currentUser?.id; const data = { externalFeelings: externalComment, - externalScore: externalScore + 1, // converts to 1-based + externalScore: externalScore == null ? null : externalScore + 1, // converts to 1-based internalFeelings: internalComment, internalScore: internalScore + 1, // converts to 1-based submissionDate: today, @@ -120,10 +113,11 @@ const PulsePage = () => { { diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 4a4a9a9a38..73355b17f0 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -197,7 +197,9 @@ const PulseReportPage = () => { } frequencies[internalScore - 1].internal++; - frequencies[externalScore - 1].external++; + if (externalScore != null) { + frequencies[externalScore - 1].external++; + } let memberIdToUse; if (memberId) { @@ -256,7 +258,9 @@ const PulseReportPage = () => { ]; for(let day of scoreChartDataPoints) { day.datapoints.forEach(datapoint => { - externalPieCounts[datapoint.externalScore - 1].value++; + if (datapoint.externalScore != null) { + externalPieCounts[datapoint.externalScore - 1].value++; + } }); } // Filter out data with a zero value so that the pie chart does not attempt diff --git a/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap b/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap index f433cc329b..5ed6cca6d9 100644 --- a/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap +++ b/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap @@ -8,11 +8,20 @@ exports[`renders correctly 1`] = `
-
- How are you feeling about work today? (*) -
+
+ How are you feeling about work today? +
+
+ * +
+
@@ -205,7 +214,6 @@ exports[`renders correctly 1`] = ` class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMultiline css-1sqnrkk-MuiInputBase-input-MuiOutlinedInput-input" id=":r5:" placeholder="Comment" - rows="4" style="height: 0px; overflow: hidden;" />