From 54b0abbbf37de56256549bbd5a09410baaeb3be6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 13 Apr 2025 13:26:36 -0700 Subject: [PATCH 1/3] web: tweak submit button text --- web/src/app/maps/[mapId]/fix/page.tsx | 2 +- web/src/app/submit/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/app/maps/[mapId]/fix/page.tsx b/web/src/app/maps/[mapId]/fix/page.tsx index adac6c2..2ae2def 100644 --- a/web/src/app/maps/[mapId]/fix/page.tsx +++ b/web/src/app/maps/[mapId]/fix/page.tsx @@ -78,7 +78,7 @@ export default function MapfixInfoPage() { width: "400px", height: "50px", marginInline: "auto" - }}>Submit + }}>Create Mapfix diff --git a/web/src/app/submit/page.tsx b/web/src/app/submit/page.tsx index b0a71e9..7e89ba8 100644 --- a/web/src/app/submit/page.tsx +++ b/web/src/app/submit/page.tsx @@ -82,7 +82,7 @@ export default function SubmissionInfoPage() { width: "400px", height: "50px", marginInline: "auto" - }}>Submit + }}>Create Submission -- 2.49.1 From 123b0c9a818fa4aa1255ff84f0649047d74d8d0f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 13 Apr 2025 16:37:22 -0700 Subject: [PATCH 2/3] web: add Username field to AuditEvent --- web/src/app/ts/AuditEvent.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/app/ts/AuditEvent.ts b/web/src/app/ts/AuditEvent.ts index 089f468..18f91a0 100644 --- a/web/src/app/ts/AuditEvent.ts +++ b/web/src/app/ts/AuditEvent.ts @@ -56,6 +56,7 @@ export interface AuditEvent { Id: number; CreatedAt: string; // ISO string, can convert to Date if needed User: number; + Username: string; ResourceType: string; // Assuming this is a string enum or similar ResourceId: number; EventType: AuditEventType; -- 2.49.1 From 6cc6da48790fba73d0cbfac1f51b0f73fc5ca8c8 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 15 Apr 2025 12:46:35 -0700 Subject: [PATCH 3/3] web: display username in audit events --- web/src/app/mapfixes/[mapfixId]/page.tsx | 10 +++++----- web/src/app/submissions/[submissionId]/page.tsx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index 97bd0a1..c7e5047 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -86,16 +86,16 @@ export default function MapfixInfoPage() { }, [mapfixId]) const comments:Comment[] = auditEvents.map((auditEvent) => { - let user = auditEvent.User.toString(); + let username = auditEvent.Username; if (auditEvent.User == 9223372036854776000) { - user = "[Validator]"; + username = "[Validator]"; } - if (mapfix && auditEvent.User == mapfix.Submitter) { - user = "[Submitter]"; + if (username === "" && mapfix && auditEvent.User == mapfix.Submitter) { + username = "[Submitter]"; } return { date: auditEvent.CreatedAt, - name: user, + name: username, comment: auditEventMessage(auditEvent), } }) diff --git a/web/src/app/submissions/[submissionId]/page.tsx b/web/src/app/submissions/[submissionId]/page.tsx index 2a0b83e..e2097d5 100644 --- a/web/src/app/submissions/[submissionId]/page.tsx +++ b/web/src/app/submissions/[submissionId]/page.tsx @@ -77,16 +77,16 @@ export default function SubmissionInfoPage() { }, [submissionId]) const comments:Comment[] = auditEvents.map((auditEvent) => { - let user = auditEvent.User.toString(); + let username = auditEvent.Username; if (auditEvent.User == 9223372036854776000) { - user = "[Validator]"; + username = "[Validator]"; } - if (submission && auditEvent.User == submission.Submitter) { - user = "[Submitter]"; + if (username === "" && submission && auditEvent.User == submission.Submitter) { + username = "[Submitter]"; } return { date: auditEvent.CreatedAt, - name: user, + name: username, comment: auditEventMessage(auditEvent), } }) -- 2.49.1