Web: Display Username in AuditEvents + Misc #135

Merged
Quaternions merged 3 commits from pr into staging 2025-04-15 20:17:49 +00:00
5 changed files with 13 additions and 12 deletions

View File

@@ -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),
}
})

View File

@@ -78,7 +78,7 @@ export default function MapfixInfoPage() {
width: "400px",
height: "50px",
marginInline: "auto"
}}>Submit</Button>
}}>Create Mapfix</Button>
</form>
</main>
</Webpage>

View File

@@ -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),
}
})

View File

@@ -82,7 +82,7 @@ export default function SubmissionInfoPage() {
width: "400px",
height: "50px",
marginInline: "auto"
}}>Submit</Button>
}}>Create Submission</Button>
</form>
</main>
</Webpage>

View File

@@ -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;