From: Daniel Karbach Date: Wed, 9 Nov 2022 08:38:13 +0000 (+0100) Subject: show number of results for open asyncs X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=b27a83336ff215aa7a0eef55e39b9af36d7547ab;p=alttp.git show number of results for open asyncs --- diff --git a/resources/js/components/rounds/Item.js b/resources/js/components/rounds/Item.js index 3197f6d..817069f 100644 --- a/resources/js/components/rounds/Item.js +++ b/resources/js/components/rounds/Item.js @@ -73,6 +73,9 @@ const Item = ({ />

: null} + {tournament.type === 'open-async' && round.results && round.results.length ? +

{i18n.t('rounds.numberOfResults', { count: round.results.length })}

+ : null}
{mayEditRound(user, tournament, round) ? @@ -91,12 +94,15 @@ Item.propTypes = { game: PropTypes.string, locked: PropTypes.bool, number: PropTypes.number, + results: PropTypes.arrayOf(PropTypes.shape({ + })), seed: PropTypes.string, title: PropTypes.string, }), tournament: PropTypes.shape({ participants: PropTypes.arrayOf(PropTypes.shape({ })), + type: PropTypes.string, }), user: PropTypes.shape({ }), diff --git a/resources/js/i18n/de.js b/resources/js/i18n/de.js index ace2f3d..5717413 100644 --- a/resources/js/i18n/de.js +++ b/resources/js/i18n/de.js @@ -434,6 +434,8 @@ export default { heading: 'Runden', new: 'Neue Runde', noSeed: 'Noch kein Seed', + numberOfResults: '{{ count }} Ergebniss', + numberOfResults_plural: '{{ count }} Ergebnisse', lock: 'Runde sperren', lockDescription: 'Wenn die Runde gesperrt wird, können Runner keine Änderungen an ihrem Ergebnis mehr vornehmen.', locked: 'Die Runde ist für weitere Änderungen am Ergebnis gesperrt.', diff --git a/resources/js/i18n/en.js b/resources/js/i18n/en.js index 9bd5213..ab70e38 100644 --- a/resources/js/i18n/en.js +++ b/resources/js/i18n/en.js @@ -434,6 +434,8 @@ export default { heading: 'Rounds', new: 'New round', noSeed: 'No seed set', + numberOfResults: '{{ count }} submission', + numberOfResults_plural: '{{ count }} submissions', lock: 'Lock round', lockDescription: 'When a round is locked, runners cannot submit or change results.', locked: 'Results for this round have been locked.',