mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-31 08:06:51 -05:00
Progress
This commit is contained in:
parent
7e11bc0dee
commit
3cc4bb7932
|
|
@ -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"])
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user