$protocol = static::create([
'tournament_id' => $tournament->id,
'user_id' => $user->id,
- 'type' => 'round.create',
+ 'type' => 'round.seed',
'details' => [
'tournament' => static::tournamentMemo($tournament),
'round' => static::roundMemo($round),
const getEntryRoundNumber = entry =>
(entry && entry.details && entry.details.round && entry.details.round.number) || '?';
+const getEntryResultComment = entry => {
+ if (!entry || !entry.details || !entry.details.result || !entry.details.result.comment) {
+ return '';
+ }
+ return entry.details.result.comment;
+};
+
const getEntryResultTime = entry => {
if (!entry || !entry.details || !entry.details.result) return 'ERROR';
const result = entry.details.result;
username: getEntryDetailsUsername(entry),
},
);
+ case 'result.comment': {
+ const comment = getEntryResultComment(entry);
+ return <Trans i18nKey={`protocol.description.${entry.type}`}>
+ <Spoiler>{{comment}}</Spoiler>,
+ </Trans>;
+ }
case 'result.report': {
const time = getEntryResultTime(entry);
return <Trans i18nKey={`protocol.description.${entry.type}`}>
}
case 'round.create':
case 'round.lock':
+ case 'round.seed':
case 'round.unlock':
return i18n.t(
`protocol.description.${entry.type}`,
number: getEntryRoundNumber(entry),
},
);
- case 'result.comment':
case 'tournament.lock':
return i18n.t(
`protocol.description.${entry.type}`,
rejected: 'Anmeldung von {{username}} abgelehnt',
},
result: {
- comment: 'Ergebnis kommentiert: "{{details.result.comment}}"',
+ comment: 'Ergebnis kommentiert: <0>{{comment}}</0>',
report: 'Ergebnis von <0>{{time}}</0> eingetragen',
},
round: {
create: 'Runde #{{number}} hinzugefügt',
lock: 'Runde #{{number}} gesperrt',
+ seed: 'Seed für Runde #{{number}} eingetragen',
unlock: 'Runde #{{number}} entsperrt',
},
tournament: {
rejected: 'Application from {{username}} rejected',
},
result: {
- comment: 'Result commented: "{{details.result.comment}}"',
- report: 'Result of {{time}} reported',
+ comment: 'Result commented: <0>{{comment}}</0>',
+ report: 'Result of <0>{{time}}</0> reported',
},
round: {
create: 'Round #{{number}} added',
lock: 'Round #{{number}} locked',
+ seed: 'Set seed for round #{{number}}',
unlock: 'Round #{{number}} unlocked',
},
tournament: {