Skip to content

Commit

Permalink
Changed Senior Delegate panel to new format (#9580)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames-dj committed Jun 26, 2024
1 parent e42249f commit 7ce1d6d
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 56 deletions.
4 changes: 4 additions & 0 deletions app/controllers/panel_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def self.panel_pages
"delegateProbations" => "delegate-probations",
"xeroUsers" => "xero-users",
"duesRedirect" => "dues-redirect",
"delegateForms" => "delegate-forms",
"regions" => "regions",
"subordinateDelegateClaims" => "subordinate-delegate-claims",
"subordinateUpcomingCompetitions" => "subordinate-upcoming-competitions",
}
end
end
2 changes: 1 addition & 1 deletion app/webpacker/components/Panel/Board/RegionsAdmin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { apiV0Urls } from '../../../lib/requests/routes.js.erb';
import { groupTypes } from '../../../lib/wca-data.js.erb';
import Loading from '../../Requests/Loading';
import Errored from '../../Requests/Errored';
import { RegionsDetailView } from '../SeniorDelegate/Regions';
import { RegionsDetailView } from '../pages/Regions';

export default function RegionsAdmin() {
const {
Expand Down
24 changes: 23 additions & 1 deletion app/webpacker/components/Panel/PanelPages.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { PANEL_PAGES } from '../../lib/wca-data.js.erb';
import { countryBandsUrl } from '../../lib/requests/routes.js.erb';
import {
countryBandsUrl,
subordinateDelegateClaimsUrl,
subordinateUpcomingCompetitionsUrl,
} from '../../lib/requests/routes.js.erb';
import PostingCompetitionsTable from '../PostingCompetitions';
import RegionManager from './Board/RegionManager';
import EditPerson from './pages/EditPerson';
Expand All @@ -10,6 +14,8 @@ import DuesExport from './pages/DuesExport';
import DelegateProbations from '../DelegateProbations';
import XeroUsers from './pages/XeroUsers';
import DuesRedirect from './pages/DuesRedirect';
import DelegateForms from './pages/DelegateForms';
import Regions from './pages/Regions';

export default {
[PANEL_PAGES.postingDashboard]: {
Expand Down Expand Up @@ -56,4 +62,20 @@ export default {
name: 'Dues Redirect',
component: DuesRedirect,
},
[PANEL_PAGES.delegateForms]: {
name: 'Delegate Forms',
component: DelegateForms,
},
[PANEL_PAGES.regions]: {
name: 'Regions',
component: Regions,
},
[PANEL_PAGES.subordinateDelegateClaims]: {
name: 'Subordinate Delegate Claims',
link: subordinateDelegateClaimsUrl,
},
[PANEL_PAGES.subordinateUpcomingCompetitions]: {
name: 'Subordinate Upcoming Competitions',
link: subordinateUpcomingCompetitionsUrl,
},
};
18 changes: 18 additions & 0 deletions app/webpacker/components/Panel/SeniorDelegate.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import PanelTemplate from './PanelTemplate';
import { PANEL_PAGES } from '../../lib/wca-data.js.erb';

export default function SeniorDelegate() {
return (
<PanelTemplate
heading="Senior Delegate Panel"
pages={[
PANEL_PAGES.delegateForms,
PANEL_PAGES.regions,
PANEL_PAGES.delegateProbations,
PANEL_PAGES.subordinateDelegateClaims,
PANEL_PAGES.subordinateUpcomingCompetitions,
]}
/>
);
}
48 changes: 0 additions & 48 deletions app/webpacker/components/Panel/SeniorDelegate/index.jsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { GroupsManagerForGroups } from '../Leader/GroupsManager';
import { apiV0Urls } from '../../../lib/requests/routes.js.erb';
import { groupTypes } from '../../../lib/wca-data.js.erb';
import useLoadedData from '../../../lib/hooks/useLoadedData';
import Loading from '../../Requests/Loading';
import Errored from '../../Requests/Errored';
import { GroupsManagerForGroups } from '../../Leader/GroupsManager';
import { apiV0Urls } from '../../../../lib/requests/routes.js.erb';
import { groupTypes } from '../../../../lib/wca-data.js.erb';
import useLoadedData from '../../../../lib/hooks/useLoadedData';
import Loading from '../../../Requests/Loading';
import Errored from '../../../Requests/Errored';

export default function GroupsManagerAdmin() {
const {
Expand Down

0 comments on commit 7ce1d6d

Please sign in to comment.