From 3cedbd2e0b1b1700840b20fe8973f2fa1ba7e0dc Mon Sep 17 00:00:00 2001 From: Gregor Billing Date: Thu, 24 Oct 2024 20:50:44 +0900 Subject: [PATCH] Fix remaining mentions of scramble VS result --- app/webpacker/components/EditResult/Create.js | 1 + app/webpacker/components/EditResult/index.js | 1 + app/webpacker/components/EditScramble/Create.js | 1 + .../EditScramble/ScrambleForm/AfterActionMessage.js | 4 ++-- .../components/EditScramble/ScrambleForm/SaveMessage.js | 2 +- .../components/EditScramble/ScrambleForm/ScrambleForm.js | 2 +- app/webpacker/components/EditScramble/index.js | 1 + app/webpacker/components/ResultsData/Panel/CreateEntry.js | 8 +++++++- app/webpacker/components/ResultsData/Panel/EditEntry.js | 6 +++++- 9 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/webpacker/components/EditResult/Create.js b/app/webpacker/components/EditResult/Create.js index 16ce385acc4..ffa339012d9 100644 --- a/app/webpacker/components/EditResult/Create.js +++ b/app/webpacker/components/EditResult/Create.js @@ -8,6 +8,7 @@ function NewResult({ return ( ); diff --git a/app/webpacker/components/EditResult/index.js b/app/webpacker/components/EditResult/index.js index 89ca0496fb1..e058961c42c 100644 --- a/app/webpacker/components/EditResult/index.js +++ b/app/webpacker/components/EditResult/index.js @@ -20,6 +20,7 @@ function EditResult({ diff --git a/app/webpacker/components/EditScramble/Create.js b/app/webpacker/components/EditScramble/Create.js index c9e831cc3a5..d8d2c880214 100644 --- a/app/webpacker/components/EditScramble/Create.js +++ b/app/webpacker/components/EditScramble/Create.js @@ -8,6 +8,7 @@ function NewScramble({ return ( ); diff --git a/app/webpacker/components/EditScramble/ScrambleForm/AfterActionMessage.js b/app/webpacker/components/EditScramble/ScrambleForm/AfterActionMessage.js index 4c3796428e5..f99dc54f1e7 100644 --- a/app/webpacker/components/EditScramble/ScrambleForm/AfterActionMessage.js +++ b/app/webpacker/components/EditScramble/ScrambleForm/AfterActionMessage.js @@ -3,7 +3,7 @@ import { Message, List } from 'semantic-ui-react'; import { adminCheckExistingResultsUrl, - competitionAllResultsUrl, + competitionScramblesUrl, competitionUrl, } from '../../../lib/requests/routes.js.erb'; @@ -41,7 +41,7 @@ function AfterActionMessage({ You can also {' '} - go back to the results + go back to the scrambles . diff --git a/app/webpacker/components/EditScramble/ScrambleForm/SaveMessage.js b/app/webpacker/components/EditScramble/ScrambleForm/SaveMessage.js index 4f996dbfbe0..fdfc2994a8f 100644 --- a/app/webpacker/components/EditScramble/ScrambleForm/SaveMessage.js +++ b/app/webpacker/components/EditScramble/ScrambleForm/SaveMessage.js @@ -16,7 +16,7 @@ function SaveMessage({ response }) { )} diff --git a/app/webpacker/components/EditScramble/ScrambleForm/ScrambleForm.js b/app/webpacker/components/EditScramble/ScrambleForm/ScrambleForm.js index 9548f926bc7..a309681bdff 100644 --- a/app/webpacker/components/EditScramble/ScrambleForm/ScrambleForm.js +++ b/app/webpacker/components/EditScramble/ScrambleForm/ScrambleForm.js @@ -55,7 +55,7 @@ function ScrambleForm({ // Attempts-related state. const [scrambleInfo, setScrambleInfo] = useState(scrambleInfoFromScramble(scramble)); - // Populate the original states whenever the original result changes. + // Populate the original states whenever the original scramble changes. useEffect(() => { setRoundData(roundDataFromScramble(scramble)); setScrambleInfo(scrambleInfoFromScramble(scramble)); diff --git a/app/webpacker/components/EditScramble/index.js b/app/webpacker/components/EditScramble/index.js index cbefcbb1df4..fe4d50c93f1 100644 --- a/app/webpacker/components/EditScramble/index.js +++ b/app/webpacker/components/EditScramble/index.js @@ -20,6 +20,7 @@ function EditScramble({ -

Creating a new result

+

+ Creating a new + {' '} + {_.upperFirst(dataType)} +

{}} /> ); diff --git a/app/webpacker/components/ResultsData/Panel/EditEntry.js b/app/webpacker/components/ResultsData/Panel/EditEntry.js index 046556a28dc..cd1a31749c7 100644 --- a/app/webpacker/components/ResultsData/Panel/EditEntry.js +++ b/app/webpacker/components/ResultsData/Panel/EditEntry.js @@ -1,5 +1,6 @@ import React from 'react'; +import _ from 'lodash'; import useLoadedData from '../../../lib/hooks/useLoadedData'; import { competitionUrl } from '../../../lib/requests/routes.js.erb'; @@ -9,6 +10,7 @@ import Errored from '../../Requests/Errored'; function EditEntry({ id, dataUrlFn, + dataType, DisplayTable, EditForm, competitionIdKey = 'competition_id', @@ -26,7 +28,9 @@ function EditEntry({ {!loading && ( <>

- Entry previously saved in the database + {_.upperFirst(dataType)} + {' '} + previously saved in the database {' '} - {' '}