This commit is contained in:
Kalle 2026-06-01 17:25:15 +03:00
parent 7e11bc0dee
commit 3cc4bb7932
2 changed files with 5 additions and 2 deletions

View File

@ -9,7 +9,6 @@ export const AUDIT_LOG_PAGE_SIZE = 30;
type TournamentAuditLogType = Tables["TournamentAuditLog"]["type"];
// xxx: can we use TablesInsertable + Pick
interface InsertArgs {
type: TournamentAuditLogType;
/** The user who performed the action. */
@ -27,7 +26,7 @@ interface InsertArgs {
* `TournamentTeamHistory` row exists for the team, so the event remains readable
* even after the team is hard-deleted.
*/
export async function insert(trx: Transaction<DB>, args: InsertArgs) { // xxx: audit codebase, trx as second arg?
export async function insert(trx: Transaction<DB>, args: InsertArgs) {
await trx
.insertInto("TournamentTeamHistory")
.columns(["tournamentTeamId", "tournamentId", "name"])

View File

@ -35,6 +35,8 @@ export function TournamentHeader({ tournament }: { tournament: Tournament }) {
(date) => date.getTime(),
);
const currentYear = new Date().getFullYear();
return (
<header className={styles.header}>
<div className={styles.identity}>
@ -62,6 +64,8 @@ export function TournamentHeader({ tournament }: { tournament: Tournament }) {
weekday: "long",
day: "numeric",
month: "long",
year:
date.getFullYear() !== currentYear ? "numeric" : undefined,
hour: "numeric",
minute: "numeric",
}}