]> git.localhorst.tv Git - alttp.git/commitdiff
display changes in result table
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 29 Nov 2025 11:31:43 +0000 (12:31 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 29 Nov 2025 11:52:41 +0000 (12:52 +0100)
resources/js/components/common/Icon.jsx
resources/js/components/results/DetailDialog.jsx
resources/js/components/results/Table.jsx
resources/js/components/results/TableRow.jsx
resources/js/i18n/de.js
resources/js/i18n/en.js
resources/sass/results.scss

index 143f0b13729abe704937c163825c793c8a982bc3..2aebeb59fe522dd355549f190d9354a9d613f03a 100644 (file)
@@ -56,6 +56,7 @@ Icon.ALLOWED = makePreset('AllowedIcon', 'square-check');
 Icon.APPLY = makePreset('ApplyIcon', 'right-to-bracket');
 Icon.APPLICATIONS = makePreset('ApplicationsIcon', 'person-running');
 Icon.BROWSER_SOURCE = makePreset('BrowserSourceIcon', 'tv');
+Icon.CHANGED = makePreset('ChangedIcon', 'pen-to-square');
 Icon.CHART = makePreset('ChartIcon', 'chart-line');
 Icon.CROSSHAIRS = makePreset('CrosshairsIcon', 'crosshairs');
 Icon.DELETE = makePreset('DeleteIcon', 'user-xmark');
index 5031caeb19239386244a9e0679176635ea42d50c..91f74eab60440ae72ec090001f107be4e84bbb37 100644 (file)
@@ -70,6 +70,9 @@ const DetailDialog = ({
                                                {(maySee || mayVerify) && result && result.has_finished
                                                        ? getTime(result, true)
                                                        : t('results.pending')}
+                                               {mayVerify && result?.changed > 0 ?
+                                                       <em className="ms-2">({t('results.changeCounter', { count: result.changed })})</em>
+                                               : null}
                                        </div>
                                </Form.Group>
                                <Form.Group as={Col} sm={6}>
index af3417cbc562d81e3eab80a782fc7b98f16ae704..a8d55d2e93b3f7f5e86c17b51da910e604d86056 100644 (file)
@@ -29,9 +29,10 @@ const ResultTable = ({ actions, round, tournament }) => {
        return <Table className="result-table" striped hover>
                <thead>
                        <tr>
-                               {mayProtocol ?
+                               {mayProtocol ? <>
+                                       <th className="result-changes"><Icon.CHANGED /></th>
                                        <th className="result-protocol"><Icon.PROTOCOL /></th>
-                               : null}
+                               </> : null}
                                <th className="result-runner">{t('results.runner')}</th>
                                {maySee ?
                                        <th className="result-placement">{t('results.placement')}</th>
index feefb548ec4bf025a38aca456dca20109cd32709..cead0b5c05c22e0b2f9df0e236bf64e872f0de9d 100644 (file)
@@ -35,7 +35,15 @@ const TableRow = ({
        );
 
        return <tr>
-               {showProtocol ?
+               {showProtocol ? <>
+                       <td className="result-changes">
+                               {result?.changed === 1 ?
+                                       `${result.changed}x`
+                               : null}
+                               {result?.changed > 1 ?
+                                       <span className="fs-5">{`${result.changed}x`}</span>
+                               : null}
+                       </td>
                        <td className="result-protocol">
                                {result ?
                                        <ResultProtocol
@@ -45,7 +53,7 @@ const TableRow = ({
                                        />
                                : null}
                        </td>
-               : null}
+               </> : null}
                <td className="result-runner">
                        <Box user={user} />
                </td>
index b1fedd9ab2de39a4ebf76fc46bfc6ad806f15cb7..0e4a175b41cf44e36fec6bcca70e0df4d43730f0 100644 (file)
@@ -405,6 +405,7 @@ export default {
                        AllowedIcon: 'Erlaubt',
                        ApplicationsIcon: 'Anträge',
                        ApplyIcon: 'Beantragen',
+                       ChangedIcon: 'Geändert',
                        ChartIcon: 'Diagramm',
                        DiscordIcon: 'Discord',
                        EditIcon: 'Bearbeiten',
@@ -622,9 +623,10 @@ export default {
                },
                results: {
                        addComment: 'Kommentieren',
+                       changeCounter: '{{ count }}x geändert',
+                       comment: 'Kommentar',
                        createdAt: 'Eingetragen am',
                        createdAtFormat: '{{ date, L LT }}',
-                       comment: 'Kommentar',
                        details: 'Details',
                        disqualified: 'Disqualifiziert',
                        disqualifiedShort: 'DQ',
index 4e3b211af1cc983d3d2eec2480e9b21dade423b5..b967ce86c0e2e6ffc7eba1d0da83f4aadef51307 100644 (file)
@@ -405,6 +405,7 @@ export default {
                        AllowedIcon: 'Allowed',
                        ApplicationsIcon: 'Applications',
                        ApplyIcon: 'Apply',
+                       ChangedIcon: 'Changed',
                        ChartIcon: 'Chart',
                        DiscordIcon: 'Discord',
                        EditIcon: 'Edit',
@@ -622,6 +623,8 @@ export default {
                },
                results: {
                        addComment: 'Comment',
+                       changeCounter: 'Changed {{ count }} times',
+                       changeCounter_one: 'Changed once',
                        comment: 'Comment',
                        createdAt: 'Entry from',
                        createdAtFormat: '{{ date, L LT }}',
index 69a232ad3d5d1b5438a7c62c8f6476e0b82633ad..0b628d0826ca12da7f54bb2430301969fbc7b425 100644 (file)
@@ -48,6 +48,7 @@
                vertical-align: middle;
        }
 
+       .result-changes,
        .result-protocol {
                text-align: center;
                width: 5ex;