Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
const [selectedEvent, setSelectedEvent] = useState('All Events');
const [selectedTime, setSelectedTime] = useState('All Time');

const [isModalOpen, setIsModalOpen] = useState(false);
const [activeEvent, setActiveEvent] = useState(null);
const [selectedUsers, setSelectedUsers] = useState([]);

const darkMode = useSelector(state => state.theme.darkMode);

const getDateRange = () => {
const today = new Date();
let startDate, endDate;
Expand Down Expand Up @@ -44,7 +50,17 @@
return true;
});

const darkMode = useSelector(state => state.theme.darkMode);
const handleOpenList = event => {
setActiveEvent(event);
setSelectedUsers([]);
setIsModalOpen(true);
};

const handleCloseModal = () => {
setIsModalOpen(false);
setActiveEvent(null);
setSelectedUsers([]);
};

return (
<div
Expand Down Expand Up @@ -105,21 +121,96 @@
<th>Event name</th>
<th>No-show rate</th>
<th>Drop-off rate</th>
<th>Attendees</th>
<th>Get list</th>
</tr>
</thead>
<tbody>
{filteredEvents.map(event => (
<tr key={event.id}>
<td>{event.eventName}</td>
<td className={`${styles.trackingRateGreen}`}>{event.noShowRate}</td>
<td className={`${styles.trackingRateRed}`}>{event.dropOffRate}</td>
<td>{event.attendees}</td>
<td className={styles.trackingRateGreen}>{event.noShowRate}</td>
<td className={styles.trackingRateRed}>{event.dropOffRate}</td>
<td>
<button
type="button"
className={styles.getListBtn}
aria-label="Get no-show list"
onClick={() => handleOpenList(event)}
>
👥
</button>
</td>
</tr>
))}
</tbody>
</table>
</div>

{isModalOpen && activeEvent && (
<div className={styles.modalOverlay}>
<div className={`${styles.modalContent} ${darkMode ? styles.modalContentDark : ''}`}>
<div className={styles.modalHeader}>
<h4>No-show list</h4>
<button type="button" className={styles.closeBtn} onClick={handleCloseModal}>
</button>
</div>

<div className={styles.modalSubHeader}>
{activeEvent.eventName} | {activeEvent.eventTime}
</div>

<div className={styles.modalList}>
<label className={styles.selectAll}>
<input
type="checkbox"
checked={
selectedUsers.length > 0 &&
selectedUsers.length === mockEvents.slice(0, 8).length
}
onChange={e =>
setSelectedUsers(e.target.checked ? mockEvents.slice(0, 8).map(u => u.id) : [])
}
/>

Check warning on line 174 in src/components/CommunityPortal/Reports/Participation/DropOffTracking.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Ambiguous spacing after previous element input

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZ0ZL0AwH2xY3s5T011B&open=AZ0ZL0AwH2xY3s5T011B&pullRequest=4564
Select all
</label>

{mockEvents.slice(0, 8).map(user => (
Copy link
Copy Markdown

@naznin07 naznin07 Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mockEvents data modeling.

PR # 4564

<label key={user.id} className={styles.userRow}>
<input
type="checkbox"
checked={selectedUsers.includes(user.id)}
onChange={() =>
setSelectedUsers(prev =>
prev.includes(user.id)
? prev.filter(id => id !== user.id)

Check failure on line 186 in src/components/CommunityPortal/Reports/Participation/DropOffTracking.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this code to not nest functions more than 4 levels deep.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZ0ZL0AwH2xY3s5T011C&open=AZ0ZL0AwH2xY3s5T011C&pullRequest=4564
: [...prev, user.id],
)
}
/>
<span className={styles.userAvatar}>👤</span>
<span className={styles.userName}>No-show person {user.id}</span>
<span className={styles.userEmail}>user{user.id}@example.com</span>
</label>
))}
</div>

<div className={styles.modalFooter}>
<button
type="button"
className={styles.sendEmailBtn}
disabled={selectedUsers.length === 0}
onClick={() => {
console.log('Send email to:', selectedUsers);
handleCloseModal();
}}
>
Send Email
</button>
</div>
</div>
</div>
)}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,26 @@
color: #9b59b6 !important;
}
}

.myCasesPageDark .viewSwitcher button,
.myCasesPageDark .createNew {
background-color: #3A506B;
color: #ffffff;
border: 1px solid #3A506B;
}

.myCasesPageDark .viewSwitcher button.active {
background-color: #007bff;
color: #ffffff;

Check warning on line 524 in src/components/CommunityPortal/Reports/Participation/MyCases.module.css

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZ0ZL0EOH2xY3s5T011J&open=AZ0ZL0EOH2xY3s5T011J&pullRequest=4564
}

.myCasesPageDark .filterDropdown {

Check warning on line 527 in src/components/CommunityPortal/Reports/Participation/MyCases.module.css

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected duplicate selector ".myCasesPageDark .filterDropdown", first used at line 128

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZ0ZL0EOH2xY3s5T011K&open=AZ0ZL0EOH2xY3s5T011K&pullRequest=4564
background-color: #3A506B;
color: #ffffff;
border: 1px solid #3A506B;
}

.myCasesPageDark .filterDropdown option {
background-color: #3A506B;
color: #ffffff;
}
Loading
Loading