Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames-dj committed Jan 28, 2025
1 parent bd4fbee commit b13e2ce
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 57 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,11 @@ def do_anonymize_person
end

private def competition_list_from_string(competition_ids_string)
(competition_ids_string || '').split(',').uniq.compact
competition_ids_string.split(',').uniq.compact
end

def complete_persons
@competition_ids = competition_list_from_string(params[:competition_ids])
@competition_ids = competition_list_from_string(params.fetch(:competition_ids, ""))
@persons_to_finish = FinishUnfinishedPersons.search_persons(@competition_ids)

if @persons_to_finish.empty?
Expand Down
4 changes: 2 additions & 2 deletions app/webpacker/components/Panel/PanelPages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import DownloadVoters from './pages/DownloadVoters';
import ApprovePictures from './pages/ApprovePictures';
import EditPersonRequestsPage from './pages/EditPersonRequestsPage';
import AnonymizationScriptPage from './pages/AnonymizationScriptPage';
import CreateNewComersPage from './pages/CreateNewComersPage';
import CreateNewcomersPage from './pages/CreateNewcomersPage';

const DELEGATE_HANDBOOK_LINK = 'https://documents.worldcubeassociation.org/edudoc/delegate-handbook/delegate-handbook.pdf';

Expand Down Expand Up @@ -169,7 +169,7 @@ export default {
},
[PANEL_PAGES.createNewComers]: {
name: 'Create New Comers',
component: CreateNewComersPage,
component: CreateNewcomersPage,
},
[PANEL_PAGES.checkRecords]: {
name: 'Check Records',
Expand Down
53 changes: 0 additions & 53 deletions app/webpacker/components/Panel/pages/CreateNewComersPage/index.jsx

This file was deleted.

47 changes: 47 additions & 0 deletions app/webpacker/components/Panel/pages/CreateNewcomersPage/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import { Header, List, ListItem } from 'semantic-ui-react';
import CompetitionsInput from './CompetitionsInput';

export default function CreateNewcomersPage() {
return (
<>
<Header>Create Newcomers</Header>
<Information />
<CompetitionsInput />
</>
);
}

function Information() {
return (
<>
<p>
In this script, a &quot;person&quot; always means a triple of (id,name,countryId) and
&quot;similar&quot; always means just name similarity. A person is called
&quot;finished&quot; if it has a non-empty personId. A &quot;semi-id&quot; is the id
without the running number at the end.
</p>
<p>
For each unfinished person in the Results table, I show you the few most similar
persons. Then you make choices and click &quot;update&quot; at the bottom of the page
to show and execute your choices. You can:
</p>
<List bulleted>
<ListItem>
Choose the person as &quot;new&quot;, optionally modifying name, country and
semi-id. This will add the person to the Persons table (with appropriately
extended id) and change its Results accordingly. If this person has both roman and
local names, the syntax for the names to be inserted correctly is
&quot;romanName (localName)&quot;.
</ListItem>
<ListItem>
Choose another person. This will overwrite the person&apos;s (id,name,countryId)
triple in the Results table with those of the other person.
</ListItem>
<ListItem>
Skip it if you&apos;re not sure yet.
</ListItem>
</List>
</>
);
}

0 comments on commit b13e2ce

Please sign in to comment.