From 0a3ed7b569ba3fb701922c1fc44e7d4893365eca Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Fri, 2 Jan 2026 14:44:30 -0500 Subject: [PATCH 1/2] fixed copy link appearing when it shouldnt --- ui/src/pages/Application.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/pages/Application.vue b/ui/src/pages/Application.vue index 7590d26..f5b4334 100644 --- a/ui/src/pages/Application.vue +++ b/ui/src/pages/Application.vue @@ -146,7 +146,7 @@ async function handleDeny(id) {

{{ member_name }}

- +

Submitted: {{ submitDate?.toLocaleString("en-US", { year: "numeric", From d9c721791e13674789370e16d3d7e42b20c3a66f Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Fri, 2 Jan 2026 14:59:37 -0500 Subject: [PATCH 2/2] Added age preview to application view --- .../components/application/ApplicationForm.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ui/src/components/application/ApplicationForm.vue b/ui/src/components/application/ApplicationForm.vue index 5384e0c..1e0c946 100644 --- a/ui/src/components/application/ApplicationForm.vue +++ b/ui/src/components/application/ApplicationForm.vue @@ -33,7 +33,7 @@ const regexB = /^https?:\/\/steamcommunity\.com\/profiles\/\d+\/?$/; const formSchema = toTypedSchema(z.object({ dob: z.string().refine(v => v, { message: "A date of birth is required." }), name: z.string().nonempty(), - playtime: z.preprocess((v) => (v === "" ? undefined : String(v)),z.string({ required_error: "Required" }).regex(/^\d+(\.\d+)?$/, "Must be a number").transform(Number).refine((n) => n >= 0, "Cannot be less than 0")), + playtime: z.preprocess((v) => (v === "" ? undefined : String(v)), z.string({ required_error: "Required" }).regex(/^\d+(\.\d+)?$/, "Must be a number").transform(Number).refine((n) => n >= 0, "Cannot be less than 0")), hobbies: z.string().nonempty(), military: z.boolean(), communities: z.string().nonempty(), @@ -109,6 +109,17 @@ watch(() => showCoC.value, async () => { } }); +function convertToAge(dob: string) { + const [month, day, year] = dob.split('/').map(Number); + + let dobDate = new Date(year, month - 1, day); + + return Math.floor( + (Date.now() - dobDate.getTime()) / (1000 * 60 * 60 * 24 * 365.2425) + ); + +} +