Skip to content
Open
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 @@ -12,6 +12,7 @@ function EventParticipation() {
const darkMode = useSelector(state => state.theme.darkMode);
const exportRef = useRef(null);
const [exporting, setExporting] = useState(false);
const [selectedOrganizer, setSelectedOrganizer] = useState('All Organizers');

const handleSaveAsPDF = useCallback(() => {
if (globalThis.window === undefined || globalThis.document === undefined) return;
Expand Down Expand Up @@ -57,23 +58,38 @@ function EventParticipation() {
>
Social And Recreational Management
</h1>
<button
className={`${styles.savePdfBtn} ${
darkMode ? styles.savePdfBtnDark : styles.savePdfBtnLight
} ${styles.noPrint}`}
onClick={handleSaveAsPDF}
disabled={exporting}
aria-busy={exporting}
>
{exporting ? (
'Preparing…'
) : (
<>
<FontAwesomeIcon icon={faFilePdf} style={{ marginRight: '6px' }} />
Save as PDF
</>
)}
</button>
<div className={styles.headerActions}>
<button
className={`${styles.savePdfBtn} ${
darkMode ? styles.savePdfBtnDark : styles.savePdfBtnLight
} ${styles.noPrint}`}
onClick={handleSaveAsPDF}
disabled={exporting}
aria-busy={exporting}
>
{exporting ? (
'Preparing…'
) : (
<>
<FontAwesomeIcon icon={faFilePdf} style={{ marginRight: '6px' }} />
Save as PDF
</>
)}
</button>

<select
className={`${styles.organizerDropdown} ${
darkMode ? styles.organizerDropdownDark : ''
}`}
value={selectedOrganizer}
onChange={e => setSelectedOrganizer(e.target.value)}
>
<option value="All Organizers">All Organizers</option>
<option value="Organizer 1">Organizer 1</option>
<option value="Organizer 2">Organizer 2</option>
<option value="Organizer 3">Organizer 3</option>
</select>
</div>
</header>

<MyCases />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function MyCases() {
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);

const isExporting =
typeof document !== 'undefined' && document.documentElement?.dataset?.exporting === 'true'; // Sonar: prefer .dataset
typeof document !== 'undefined' && document.documentElement?.dataset?.exporting === 'true';

const filterEvents = events => {
const now = new Date();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,34 @@
letter-spacing: 0.5px;
}

.headerActions {
display: flex;
align-items: center;
gap: 12px;
}

.organizerDropdown {
padding: 8px 14px;
border-radius: 6px;
border: 1px solid #d1d5db;
background-color: #fff;
color: #333;
font-size: 14px;
min-width: 180px;
cursor: pointer;
}

.organizerDropdown:focus {
outline: none;
border-color: #3b82f6;
}

.organizerDropdownDark {
background-color: #1e293b;
color: #fff;
border: 1px solid #475569;
}

/* ---------- Save as PDF button ---------- */
.savePdfBtn {
font-size: 14px;
Expand Down Expand Up @@ -1113,7 +1141,7 @@

.insightsDark .insightsTab.activeTab {
background-color: #007bff;
color: #ffffff;
color: #fff;

Check warning on line 1144 in src/components/CommunityPortal/Reports/Participation/Participation.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=AZ5RVy4pXSDqH0AcqTvA&open=AZ5RVy4pXSDqH0AcqTvA&pullRequest=5267
}

/* ---------- Info Tooltip Icons ---------- */
Expand All @@ -1130,9 +1158,9 @@
}

.trackingTableDark .infoIcon {
color: #cccccc;
color: #ccc;
}

.trackingTableDark .infoIcon:hover {
color: #ffffff;
color: #fff;
}
Loading