From 339f30913d996af3d1cd82541e0a33cbd81d0bd4 Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Thu, 16 May 2024 15:27:11 -0500 Subject: [PATCH 01/23] progress on 2357 --- web-ui/src/components/menu/Menu.jsx | 7 +++ web-ui/src/components/routes/Routes.jsx | 5 ++ web-ui/src/context/selectors.js | 10 ++++ web-ui/src/pages/PulseReportPage.jsx | 69 +++++++++++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 web-ui/src/pages/PulseReportPage.jsx diff --git a/web-ui/src/components/menu/Menu.jsx b/web-ui/src/components/menu/Menu.jsx index be32fba448..8d6975de22 100644 --- a/web-ui/src/components/menu/Menu.jsx +++ b/web-ui/src/components/menu/Menu.jsx @@ -9,6 +9,7 @@ import { selectHasAnniversaryReportPermission, selectHasBirthdayReportPermission, selectHasCheckinsReportPermission, + selectHasPulseReportPermission, selectHasSkillsReportPermission, selectHasTeamSkillsReportPermission } from '../../context/selectors'; @@ -121,6 +122,12 @@ function Menu({ children }) { links.push(['/checkins-reports', 'Check-ins']); } + //TODO: Skipping the permission check during testing + // because this permission has not been implemented yet. + // if (selectHasPulseReportPermission(state)) { + links.push(['/pulse-reports', 'Pulses']); + // } + if (selectHasSkillsReportPermission(state)) { links.push(['/skills-reports', 'Skills']); } diff --git a/web-ui/src/components/routes/Routes.jsx b/web-ui/src/components/routes/Routes.jsx index a054038fb2..2468972b76 100644 --- a/web-ui/src/components/routes/Routes.jsx +++ b/web-ui/src/components/routes/Routes.jsx @@ -15,6 +15,7 @@ import Header from '../header/Header'; import HomePage from '../../pages/HomePage'; import PeoplePage from '../../pages/PeoplePage'; import PulsePage from '../../pages/PulsePage'; +import PulseReportPage from '../../pages/PulseReportPage'; import MemberProfilePage from '../../pages/MemberProfilePage'; import Roles from '../admin/roles/Roles'; import SkillReportPage from '../../pages/SkillReportPage'; @@ -142,6 +143,10 @@ export default function Routes() {
+ +
+ +
diff --git a/web-ui/src/context/selectors.js b/web-ui/src/context/selectors.js index 54ca22f664..d250091ebe 100644 --- a/web-ui/src/context/selectors.js +++ b/web-ui/src/context/selectors.js @@ -94,6 +94,16 @@ export const selectHasProfileReportPermission = createSelector( ) ); +export const selectHasPulseReportPermission = createSelector( + selectUserProfile, + userProfile => + userProfile && + userProfile.role && + userProfile.permissions.some(p => + p?.permission?.includes('CAN_VIEW_ALL_PULSE_RESPONSES') + ) +); + export const selectHasSkillsReportPermission = createSelector( selectUserProfile, userProfile => diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx new file mode 100644 index 0000000000..4fb136fa68 --- /dev/null +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -0,0 +1,69 @@ +import { format } from 'date-fns'; +import React, { useContext, useEffect, useState } from 'react'; +import { Button, Typography } from '@mui/material'; + +import { resolve } from '../api/api.js'; +import Pulse from '../components/pulse/Pulse.jsx'; +import { AppContext } from '../context/AppContext.jsx'; +import { + selectCsrfToken, + selectCurrentUser, + selectHasPulseReportPermission +} from '../context/selectors.js'; + +import './PulsePage.css'; + +const PulseReportPage = () => { + const { state } = useContext(AppContext); + const csrf = selectCsrfToken(state); + + const [pulses, setPulses] = useState(null); + console.log('PulseReportPage.jsx: pulses =', pulses); + + const loadPulses = async () => { + if (!csrf) return; + + const dateTo = new Date(); + const dateFrom = new Date(); + dateFrom.setMonth(dateTo.getMonth() - 3); + const query = { + dateFrom: format(dateFrom, `yyyy-MM-dd`), + dateTo: format(dateTo, `yyyy-MM-dd`) + }; + const queryString = Object.entries(query) + .map(([key, value]) => `${key}=${value}`) + .join('&'); + + try { + const res = await resolve({ + method: 'GET', + url: `/services/pulse-responses?${queryString}`, + headers: { + 'X-CSRF-Header': csrf, + Accept: 'application/json', + 'Content-Type': 'application/json;charset=UTF-8' + } + }); + if (res.error) throw new Error(res.error.message); + const pulses = res.payload.data; + //TODO: Currently these objects only contain the comment text value, + // not scores, but story 2345 will add those. + setPulses(pulses); + } catch (err) { + console.error('PulsePage.jsx loadTodayPulse:', err); + } + }; + + useEffect(() => { + //TODO: Skipping the permission check during testing + // because this permission has not been implemented yet. + // if (selectHasPulseReportPermission(state)) loadPulses(); + loadPulses(); + }, [csrf]); + + return
Pulse report goes here!
; +}; + +PulseReportPage.displayName = 'PulseReportPage'; + +export default PulseReportPage; From 19a876aab916265d61603ae40beb650ba8a2339c Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Thu, 16 May 2024 16:05:34 -0500 Subject: [PATCH 02/23] progress on 2357 --- web-ui/src/components/reviews/TeamReviews.jsx | 1 - web-ui/src/pages/PulseReportPage.css | 6 ++ web-ui/src/pages/PulseReportPage.jsx | 63 ++++++++++++++++--- 3 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 web-ui/src/pages/PulseReportPage.css diff --git a/web-ui/src/components/reviews/TeamReviews.jsx b/web-ui/src/components/reviews/TeamReviews.jsx index e32d3842ec..64780cc8b2 100644 --- a/web-ui/src/components/reviews/TeamReviews.jsx +++ b/web-ui/src/components/reviews/TeamReviews.jsx @@ -64,7 +64,6 @@ import { selectCurrentUser, selectCurrentUserSubordinates, selectIsAdmin, - selectMyTeam, selectReviewPeriod, selectSupervisors, selectTeamMembersBySupervisorId diff --git a/web-ui/src/pages/PulseReportPage.css b/web-ui/src/pages/PulseReportPage.css new file mode 100644 index 0000000000..3364fd33c4 --- /dev/null +++ b/web-ui/src/pages/PulseReportPage.css @@ -0,0 +1,6 @@ +.pulse-report-page { + .date-pickers { + display: flex; + gap: 1rem; + } +} diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 4fb136fa68..e9d1d6f1a3 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -1,9 +1,15 @@ import { format } from 'date-fns'; +import dayjs from 'dayjs'; import React, { useContext, useEffect, useState } from 'react'; import { Button, Typography } from '@mui/material'; +import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; +import { DatePicker } from '@mui/x-date-pickers/DatePicker'; +import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; + import { resolve } from '../api/api.js'; import Pulse from '../components/pulse/Pulse.jsx'; +import MemberSelector from '../components/member_selector/MemberSelector'; import { AppContext } from '../context/AppContext.jsx'; import { selectCsrfToken, @@ -11,21 +17,25 @@ import { selectHasPulseReportPermission } from '../context/selectors.js'; -import './PulsePage.css'; +import './PulseReportPage.css'; const PulseReportPage = () => { const { state } = useContext(AppContext); const csrf = selectCsrfToken(state); + const initialDateFrom = new Date(); + initialDateFrom.setMonth(initialDateFrom.getMonth() - 3); + const [dateFrom, setDateFrom] = useState(initialDateFrom); + + const [dateTo, setDateTo] = useState(new Date()); + const [pulses, setPulses] = useState(null); - console.log('PulseReportPage.jsx: pulses =', pulses); + if (pulses) console.log('PulseReportPage.jsx: pulses =', pulses); + const [teamMembers, setTeamMembers] = useState([]); const loadPulses = async () => { if (!csrf) return; - const dateTo = new Date(); - const dateFrom = new Date(); - dateFrom.setMonth(dateTo.getMonth() - 3); const query = { dateFrom: format(dateFrom, `yyyy-MM-dd`), dateTo: format(dateTo, `yyyy-MM-dd`) @@ -59,9 +69,48 @@ const PulseReportPage = () => { // because this permission has not been implemented yet. // if (selectHasPulseReportPermission(state)) loadPulses(); loadPulses(); - }, [csrf]); + }, [csrf, dateFrom, dateTo]); + + const handleDateFromChange = dayJsDate => { + const date = new Date(dayJsDate.valueOf()); + setDateFrom(date); + if (date > dateTo) setDateTo(date); + }; + + const handleDateToChange = dayJsDate => { + const date = new Date(dayJsDate.valueOf()); + if (date < dateFrom) setDateFrom(date); + setDateTo(date); + }; + + const handleTeamMembersChange = members => { + setTeamMembers(members); + }; - return
Pulse report goes here!
; + return ( +
+
+ + + + +
+ +
+ ); }; PulseReportPage.displayName = 'PulseReportPage'; From 801063d3b2651b640ccd868a0b4b4dc9f145b749 Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Thu, 16 May 2024 16:11:39 -0500 Subject: [PATCH 03/23] progress on 2357 --- web-ui/src/pages/PulseReportPage.jsx | 92 ++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index e9d1d6f1a3..56fde4c5a5 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -1,6 +1,17 @@ import { format } from 'date-fns'; import dayjs from 'dayjs'; import React, { useContext, useEffect, useState } from 'react'; +import { + Bar, + BarChart, + CartesianGrid, + Legend, + Line, + LineChart, + Tooltip, + XAxis, + YAxis +} from 'recharts'; import { Button, Typography } from '@mui/material'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; @@ -19,6 +30,50 @@ import { import './PulseReportPage.css'; +const data = [ + { + name: 'Page A', + uv: 4000, + pv: 2400, + amt: 2400 + }, + { + name: 'Page B', + uv: 3000, + pv: 1398, + amt: 2210 + }, + { + name: 'Page C', + uv: 2000, + pv: 9800, + amt: 2290 + }, + { + name: 'Page D', + uv: 2780, + pv: 3908, + amt: 2000 + }, + { + name: 'Page E', + uv: 1890, + pv: 4800, + amt: 2181 + }, + { + name: 'Page F', + uv: 2390, + pv: 3800, + amt: 2500 + }, + { + name: 'Page G', + uv: 3490, + pv: 4300, + amt: 2100 + } +]; const PulseReportPage = () => { const { state } = useContext(AppContext); const csrf = selectCsrfToken(state); @@ -105,10 +160,47 @@ const PulseReportPage = () => { /> + + {/* TODO: Permissions should affect which members can be selected. */} + + + + + + + + + + + + + + + + + + + + ); }; From 3232c5eb216679b7efab254b33ed294d4c19fe8a Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Thu, 16 May 2024 16:59:04 -0500 Subject: [PATCH 04/23] progress on 2357 --- web-ui/src/pages/PulseReportPage.jsx | 130 +++++++++++++++++++-------- 1 file changed, 95 insertions(+), 35 deletions(-) diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 56fde4c5a5..8203fadaf2 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -12,7 +12,13 @@ import { XAxis, YAxis } from 'recharts'; -import { Button, Typography } from '@mui/material'; +import { + Button, + Card, + CardContent, + CardHeader, + Typography +} from '@mui/material'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { DatePicker } from '@mui/x-date-pickers/DatePicker'; @@ -30,6 +36,20 @@ import { import './PulseReportPage.css'; +const randomScore = previousScore => { + if (!previousScore) return Math.ceil(Math.random() * 5); + + const atLow = previousScore === 1; + const atHigh = previousScore === 5; + const spread = atLow || atHigh ? 1 : 2; + const delta = Math.round(Math.random() * spread); + return atLow + ? previousScore + delta + : atHigh + ? previousScore - delta + : previousScore - 1 + delta; +}; + const data = [ { name: 'Page A', @@ -81,13 +101,35 @@ const PulseReportPage = () => { const initialDateFrom = new Date(); initialDateFrom.setMonth(initialDateFrom.getMonth() - 3); const [dateFrom, setDateFrom] = useState(initialDateFrom); - const [dateTo, setDateTo] = useState(new Date()); const [pulses, setPulses] = useState(null); if (pulses) console.log('PulseReportPage.jsx: pulses =', pulses); const [teamMembers, setTeamMembers] = useState([]); + const [lineChartData, setLineChartData] = useState([]); + + // This generates random data to use in the line chart + // since we do not yet have data in the database. + useEffect(() => { + const data = []; + let internalScore = null; + let externalScore = null; + let date = new Date(dateFrom); + while (date < dateTo) { + internalScore = randomScore(internalScore); + externalScore = randomScore(externalScore); + data.push({ + date: format(date, `yyyy-MM-dd`), + internalScore: internalScore, + externalScore: externalScore + }); + date.setDate(date.getDate() + 1); + } + setLineChartData(data); + console.log('PulseReportPage.jsx useEffect: data =', data); + }, [dateFrom, dateTo]); + const loadPulses = async () => { if (!csrf) return; @@ -128,12 +170,14 @@ const PulseReportPage = () => { const handleDateFromChange = dayJsDate => { const date = new Date(dayJsDate.valueOf()); + console.log('PulseReportPage.jsx handleDateFromChange: date =', date); setDateFrom(date); if (date > dateTo) setDateTo(date); }; const handleDateToChange = dayJsDate => { const date = new Date(dayJsDate.valueOf()); + console.log('PulseReportPage.jsx handleDateToChange: date =', date); if (date < dateFrom) setDateFrom(date); setDateTo(date); }; @@ -167,40 +211,56 @@ const PulseReportPage = () => { selected={teamMembers} /> - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + ); }; From 8681b999aaad79b9a3121d67edc665fcb884a05d Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Mon, 20 May 2024 10:13:33 -0500 Subject: [PATCH 05/23] progress on 2357 --- web-ui/src/pages/PulseReportPage.jsx | 101 +++++++++++---------------- 1 file changed, 40 insertions(+), 61 deletions(-) diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 8203fadaf2..301af5997f 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -36,6 +36,7 @@ import { import './PulseReportPage.css'; +// Returns a random, integer score between 1 and 5. const randomScore = previousScore => { if (!previousScore) return Math.ceil(Math.random() * 5); @@ -50,50 +51,7 @@ const randomScore = previousScore => { : previousScore - 1 + delta; }; -const data = [ - { - name: 'Page A', - uv: 4000, - pv: 2400, - amt: 2400 - }, - { - name: 'Page B', - uv: 3000, - pv: 1398, - amt: 2210 - }, - { - name: 'Page C', - uv: 2000, - pv: 9800, - amt: 2290 - }, - { - name: 'Page D', - uv: 2780, - pv: 3908, - amt: 2000 - }, - { - name: 'Page E', - uv: 1890, - pv: 4800, - amt: 2181 - }, - { - name: 'Page F', - uv: 2390, - pv: 3800, - amt: 2500 - }, - { - name: 'Page G', - uv: 3490, - pv: 4300, - amt: 2100 - } -]; +let responseFrequencies = []; const PulseReportPage = () => { const { state } = useContext(AppContext); const csrf = selectCsrfToken(state); @@ -104,30 +62,40 @@ const PulseReportPage = () => { const [dateTo, setDateTo] = useState(new Date()); const [pulses, setPulses] = useState(null); - if (pulses) console.log('PulseReportPage.jsx: pulses =', pulses); const [teamMembers, setTeamMembers] = useState([]); + const [barChartData, setBarChartData] = useState([]); const [lineChartData, setLineChartData] = useState([]); // This generates random data to use in the line chart // since we do not yet have data in the database. useEffect(() => { const data = []; - let internalScore = null; - let externalScore = null; + let internal = null; + let external = null; let date = new Date(dateFrom); while (date < dateTo) { - internalScore = randomScore(internalScore); - externalScore = randomScore(externalScore); + internal = randomScore(internal); + external = randomScore(external); data.push({ date: format(date, `yyyy-MM-dd`), - internalScore: internalScore, - externalScore: externalScore + internal, + external }); date.setDate(date.getDate() + 1); } setLineChartData(data); - console.log('PulseReportPage.jsx useEffect: data =', data); + + const frequencies = []; + for (let i = 1; i <= 5; i++) { + frequencies.push({ score: i, internal: 0, external: 0 }); + } + for (const d of data) { + frequencies[d.internal - 1].internal++; + frequencies[d.external - 1].external++; + } + console.log('PulseReportPage.jsx : frequencies =', frequencies); + setBarChartData(frequencies); }, [dateFrom, dateTo]); const loadPulses = async () => { @@ -217,19 +185,30 @@ const PulseReportPage = () => { titleTypographyProps={{ variant: 'h5', component: 'h2' }} /> - + - + + - @@ -243,7 +222,7 @@ const PulseReportPage = () => { { }} > - + - - + + From 32b12212dac6bfaf62cb055de13062477ef5c0d7 Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Mon, 20 May 2024 11:05:29 -0500 Subject: [PATCH 06/23] progress on 2357 --- .../reviews/periods/ReviewPeriodCard.jsx | 1 - .../reviews/periods/ReviewPeriods.jsx | 1 - web-ui/src/pages/PulseReportPage.jsx | 53 ++++++++++--------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/web-ui/src/components/reviews/periods/ReviewPeriodCard.jsx b/web-ui/src/components/reviews/periods/ReviewPeriodCard.jsx index 99f94d565f..245e24be8d 100644 --- a/web-ui/src/components/reviews/periods/ReviewPeriodCard.jsx +++ b/web-ui/src/components/reviews/periods/ReviewPeriodCard.jsx @@ -13,7 +13,6 @@ import { Avatar, Card, CardActions, - CardContent, Collapse, ListItemAvatar, ListItemText diff --git a/web-ui/src/components/reviews/periods/ReviewPeriods.jsx b/web-ui/src/components/reviews/periods/ReviewPeriods.jsx index 9004b4272f..e7c2cb6f07 100644 --- a/web-ui/src/components/reviews/periods/ReviewPeriods.jsx +++ b/web-ui/src/components/reviews/periods/ReviewPeriods.jsx @@ -2,7 +2,6 @@ import PropTypes from 'prop-types'; import React, { useCallback, useContext, useEffect, useState } from 'react'; import { - Avatar, Box, Button, FormControl, diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 301af5997f..2f98be2246 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -8,6 +8,7 @@ import { Legend, Line, LineChart, + ResponsiveContainer, Tooltip, XAxis, YAxis @@ -185,31 +186,33 @@ const PulseReportPage = () => { titleTypographyProps={{ variant: 'h5', component: 'h2' }} /> - - - - - - - - - + + + + + + + + + + + From 568717ea72a3dc1c13e5a198649471ea359777a4 Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Mon, 20 May 2024 11:12:27 -0500 Subject: [PATCH 07/23] progress on 2357 --- web-ui/src/pages/PulseReportPage.jsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index 2f98be2246..d56cfd92a3 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -37,6 +37,13 @@ import { import './PulseReportPage.css'; +// Recharts doesn't support using CSS variables, so we can't +// easily used color variables defined in variables.css. +const ociDarkBlue = '#2c519e'; +//const ociLightBlue = '#76c8d4'; // not currently used +// const ociOrange = '#f8b576'; // too light +const orange = '#b26801'; + // Returns a random, integer score between 1 and 5. const randomScore = previousScore => { if (!previousScore) return Math.ceil(Math.random() * 5); @@ -202,13 +209,13 @@ const PulseReportPage = () => { @@ -238,8 +245,8 @@ const PulseReportPage = () => { - - + + From 38b37b6353a1be22f10826b7facd0404207c776e Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Mon, 20 May 2024 11:25:52 -0500 Subject: [PATCH 08/23] progress on 2357 --- .../src/components/expand-more/ExpandMore.jsx | 2 +- web-ui/src/pages/PulseReportPage.css | 8 +++++++ web-ui/src/pages/PulseReportPage.jsx | 24 +++++++++++++++---- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/web-ui/src/components/expand-more/ExpandMore.jsx b/web-ui/src/components/expand-more/ExpandMore.jsx index 834dc9c1fb..acb9c17a30 100644 --- a/web-ui/src/components/expand-more/ExpandMore.jsx +++ b/web-ui/src/components/expand-more/ExpandMore.jsx @@ -5,7 +5,7 @@ import { IconButton } from '@mui/material'; const ExpandMore = styled(props => { const { expand, ...other } = props; return ( - + {props.children ? props.children : } ); diff --git a/web-ui/src/pages/PulseReportPage.css b/web-ui/src/pages/PulseReportPage.css index 3364fd33c4..6444e213da 100644 --- a/web-ui/src/pages/PulseReportPage.css +++ b/web-ui/src/pages/PulseReportPage.css @@ -3,4 +3,12 @@ display: flex; gap: 1rem; } + + .expand-more { + margin-bottom: 1rem; + } + + .recharts-wrapper { + display: inline-block; + } } diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx index d56cfd92a3..f2e6fcd6c5 100644 --- a/web-ui/src/pages/PulseReportPage.jsx +++ b/web-ui/src/pages/PulseReportPage.jsx @@ -18,6 +18,7 @@ import { Card, CardContent, CardHeader, + Collapse, Typography } from '@mui/material'; @@ -34,6 +35,7 @@ import { selectCurrentUser, selectHasPulseReportPermission } from '../context/selectors.js'; +import ExpandMore from '../components/expand-more/ExpandMore'; import './PulseReportPage.css'; @@ -69,11 +71,11 @@ const PulseReportPage = () => { const [dateFrom, setDateFrom] = useState(initialDateFrom); const [dateTo, setDateTo] = useState(new Date()); - const [pulses, setPulses] = useState(null); - const [teamMembers, setTeamMembers] = useState([]); - const [barChartData, setBarChartData] = useState([]); + const [expanded, setExpanded] = useState(false); const [lineChartData, setLineChartData] = useState([]); + const [pulses, setPulses] = useState(null); + const [teamMembers, setTeamMembers] = useState([]); // This generates random data to use in the line chart // since we do not yet have data in the database. @@ -102,7 +104,6 @@ const PulseReportPage = () => { frequencies[d.internal - 1].internal++; frequencies[d.external - 1].external++; } - console.log('PulseReportPage.jsx : frequencies =', frequencies); setBarChartData(frequencies); }, [dateFrom, dateTo]); @@ -248,6 +249,21 @@ const PulseReportPage = () => { + setExpanded(!expanded)} + aria-expanded={expanded} + aria-label={expanded ? 'show less' : 'show more'} + size="large" + /> + + Member data goes here. + From 5f5a3a446b3fc2abb01fc188c9d38f71a4ab7234 Mon Sep 17 00:00:00 2001 From: Mark Volkmann Date: Mon, 20 May 2024 13:27:26 -0500 Subject: [PATCH 09/23] progress on 2357 --- .../FeedbackRequestCard.test.jsx.snap | 2 +- web-ui/src/components/pulse/Pulse.test.jsx | 8 +- .../pulse/__snapshots__/Pulse.test.jsx.snap | 521 ++++++++---------- .../__snapshots__/PulsePage.test.jsx.snap | 46 +- 4 files changed, 258 insertions(+), 319 deletions(-) diff --git a/web-ui/src/components/feedback_request_card/__snapshots__/FeedbackRequestCard.test.jsx.snap b/web-ui/src/components/feedback_request_card/__snapshots__/FeedbackRequestCard.test.jsx.snap index f05abe131a..75039b517a 100644 --- a/web-ui/src/components/feedback_request_card/__snapshots__/FeedbackRequestCard.test.jsx.snap +++ b/web-ui/src/components/feedback_request_card/__snapshots__/FeedbackRequestCard.test.jsx.snap @@ -74,7 +74,7 @@ exports[`renders correctly 1`] = ` - - - - - -
- -
- -
+ + + + + + + +
+
- + Comment + +
- - Comment - - - + +