From 15e2dfb57a4842c1a74be6d496893ba0040841d9 Mon Sep 17 00:00:00 2001 From: Nick Silvestri Date: Sat, 18 Jan 2025 13:38:31 -0800 Subject: [PATCH] This commit: 1. Moves the Delegate Handbook link to the Important Links section 2. Removes the "All Delegates" link from the Delegate panel, because it is not necessary or useful here 3. Adds sections to the Important Links so that they are better organized --- app/models/user.rb | 2 - app/webpacker/components/Panel/PanelPages.jsx | 7 +- .../Panel/pages/ImportantLinks/index.jsx | 92 +++++++++++-------- 3 files changed, 54 insertions(+), 47 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 4aa0e568625..b2befb86fe4 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -637,7 +637,6 @@ def self.panel_pages :leaderForms, :groupsManager, :importantLinks, - :delegateHandbook, :seniorDelegatesList, :leadersAdmin, :boardEditor, @@ -682,7 +681,6 @@ def self.panel_list name: 'Delegate panel', pages: [ panel_pages[:importantLinks], - panel_pages[:delegateHandbook], panel_pages[:bannedCompetitors], ], }, diff --git a/app/webpacker/components/Panel/PanelPages.jsx b/app/webpacker/components/Panel/PanelPages.jsx index 369264676ff..684fc21114b 100644 --- a/app/webpacker/components/Panel/PanelPages.jsx +++ b/app/webpacker/components/Panel/PanelPages.jsx @@ -40,7 +40,8 @@ import ApprovePictures from './pages/ApprovePictures'; import EditPersonRequestsPage from './pages/EditPersonRequestsPage'; import AnonymizationScriptPage from './pages/AnonymizationScriptPage'; -const DELEGATE_HANDBOOK_LINK = 'https://documents.worldcubeassociation.org/edudoc/delegate-handbook/delegate-handbook.pdf'; +const DELEGATE_HANDBOOK_LINK = + 'https://documents.worldcubeassociation.org/edudoc/delegate-handbook/delegate-handbook.pdf'; export default { [PANEL_PAGES.postingDashboard]: { @@ -115,10 +116,6 @@ export default { name: 'Important Links', component: ImportantLinks, }, - [PANEL_PAGES.delegateHandbook]: { - name: 'Delegate Handbook', - link: DELEGATE_HANDBOOK_LINK, - }, [PANEL_PAGES.seniorDelegatesList]: { name: 'Senior Delegates List', component: SeniorDelegatesList, diff --git a/app/webpacker/components/Panel/pages/ImportantLinks/index.jsx b/app/webpacker/components/Panel/pages/ImportantLinks/index.jsx index d69f5d25b7f..e7de00ff987 100644 --- a/app/webpacker/components/Panel/pages/ImportantLinks/index.jsx +++ b/app/webpacker/components/Panel/pages/ImportantLinks/index.jsx @@ -1,50 +1,57 @@ import React from 'react'; import { Header, List } from 'semantic-ui-react'; -import { allDelegatePageUrl, countryBandsUrl } from '../../../../lib/requests/routes.js.erb'; const IMPORTANT_LINKS = [ { - title: 'Guidelines for Disciplinary Incidents', - link: 'https://documents.worldcubeassociation.org/edudoc/guidelines-for-disciplinary-incidents/guidelines-for-disciplinary-incidents.pdf', + section: 'Guides', + links: [ + { + title: 'Delegate Handbook', + link: 'https://documents.worldcubeassociation.org/edudoc/delegate-handbook/delegate-handbook.pdf', + }, + { + title: 'Guidelines for Disciplinary Incidents', + link: 'https://documents.worldcubeassociation.org/edudoc/guidelines-for-disciplinary-incidents/guidelines-for-disciplinary-incidents.pdf', + }, + { + title: 'Visual Guide for Regulation 3j', + link: 'https://drive.google.com/file/d/1m6THsA8fXRN7QFM4ApJbm6eVODKGbMLx/view', + }, + { + title: 'Visual Guide for Regulation 5b5f', + link: 'https://drive.google.com/file/d/15XszaCGNvy3Dk6X6qERzZWZaDH1RH04z/view', + }, + ], }, { - title: 'All Delegates', - link: allDelegatePageUrl, - }, - { - title: 'WR Submission Form', - link: 'https://docs.google.com/forms/d/e/1FAIpQLSeLrkLhFnIy1QNGoWoZT4jsOIibNJ_xc9qTd_YKBpcuMIq-LA/viewform', - }, - { - title: 'Gear Order Form', - link: 'https://forms.gle/owX3ppZahYkoq9s48', - }, - { - title: 'Travel Reimbursement Form', - link: 'https://docs.google.com/forms/d/12tz2I_EeBORm14kQO6ZB5TOp321YbXkIXvrxUNIHxN0/viewform', - }, - { - title: 'Equipment Funding Form', - link: 'https://docs.google.com/forms/d/e/1FAIpQLSebkWMyG2kRzR3cDm3jXFVMFCwd5u4XI6Yt35givu0SOidpHg/viewform', - }, - { - title: 'Bands for WCA Dues', - link: countryBandsUrl, - }, - { - title: 'Visual Guide for Regulation 3j', - link: 'https://drive.google.com/file/d/1m6THsA8fXRN7QFM4ApJbm6eVODKGbMLx/view', - }, - { - title: 'Visual Guide for Regulation 5b5f', - link: 'https://drive.google.com/file/d/15XszaCGNvy3Dk6X6qERzZWZaDH1RH04z/view', + section: 'Forms', + links: [ + { + title: 'Gear Order Form', + link: 'https://forms.gle/owX3ppZahYkoq9s48', + }, + { + title: 'Equipment Funding Form', + link: 'https://docs.google.com/forms/d/e/1FAIpQLSebkWMyG2kRzR3cDm3jXFVMFCwd5u4XI6Yt35givu0SOidpHg/viewform', + }, + { + title: 'Travel Reimbursement Form', + link: 'https://docs.google.com/forms/d/12tz2I_EeBORm14kQO6ZB5TOp321YbXkIXvrxUNIHxN0/viewform', + }, + { + title: 'WR Submission Form', + link: 'https://docs.google.com/forms/d/e/1FAIpQLSeLrkLhFnIy1QNGoWoZT4jsOIibNJ_xc9qTd_YKBpcuMIq-LA/viewform', + }, + ], }, ]; function ListItemLink({ title, link }) { return ( - {title} + + {title} + ); } @@ -52,12 +59,17 @@ function ListItemLink({ title, link }) { export default function ImportantLinks() { return ( <> -
Important Links
- - {IMPORTANT_LINKS.map(({ title, link }) => ( - - ))} - +
Important Links
+ {IMPORTANT_LINKS.map(({ section, links }) => ( +
+
{section}
+ + {links.map(({ title, link }) => ( + + ))} + +
+ ))} ); }