7 Commits
0.4.0 ... 0.4.1

Author SHA1 Message Date
05e6030626 Merge pull request 'fixed bug that caused the latest application to be hidden' (#111) from Recruiter-fix into main
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m43s
Continuous Deployment / Update Deployment (push) Successful in 2m24s
Reviewed-on: #111
2025-12-16 17:26:55 -06:00
d01881f0af fixed bug that caused the latest application to be hidden 2025-12-16 18:28:04 -05:00
905a975327 Merge pull request 'application-spacing-fix' (#110) from application-spacing-fix into main
All checks were successful
Continuous Integration / Update Development (push) Successful in 2m26s
Reviewed-on: #110
2025-12-16 10:08:17 -06:00
5659f053ba tweaked semantics for comment post public button 2025-12-16 11:03:45 -05:00
52b0e3e86d potential fix for an error on first time application view 2025-12-16 11:03:31 -05:00
e949e32189 updated form validation to catch scientific notation 2025-12-16 10:57:01 -05:00
e9fadc724e fixed bottom margin not applying and header scroll issue 2025-12-16 10:38:21 -05:00
4 changed files with 7 additions and 5 deletions

View File

@@ -32,6 +32,8 @@ export async function getApplicationByID(appID: number): Promise<ApplicationRow>
}
export async function getApplicationList(page: number = 1, pageSize: number = 25): Promise<ApplicationListRow[]> {
const offset = (page - 1) * pageSize;
const sql = `SELECT
member.name AS member_name,
app.id,
@@ -44,7 +46,7 @@ export async function getApplicationList(page: number = 1, pageSize: number = 25
ORDER BY app.submitted_at DESC
LIMIT ? OFFSET ?;`
const rows: ApplicationListRow[] = await pool.query(sql, [pageSize, page]);
const rows: ApplicationListRow[] = await pool.query(sql, [pageSize, offset]);
return rows;
}

View File

@@ -64,7 +64,7 @@ function onSubmit(values: { text: string }, { resetForm }: { resetForm: () => vo
<!-- Button below, right-aligned -->
<div class="mt-2 flex justify-end gap-2">
<Button v-if="adminMode" type="submit" @click="submitMode = 'internal'" variant="outline">Post (Internal)</Button>
<Button type="submit" @click="submitMode = 'public'">Post (Public)</Button>
<Button type="submit" @click="submitMode = 'public'">{{ adminMode ? 'Post (Public)' : 'Post' }}</Button>
</div>
</Form>

View File

@@ -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.coerce.number({ invalid_type_error: "Must be a number", }).min(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(),

View File

@@ -125,7 +125,7 @@ async function handleDeny(id) {
</script>
<template>
<div v-if="!loading" class="w-full h-20">
<div v-if="!loading" class="w-full">
<div v-if="unauthorized" class="flex justify-center w-full my-10">
You do not have permission to view this application.
</div>
@@ -134,7 +134,7 @@ async function handleDeny(id) {
<!-- Application header -->
<div>
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight">{{ member_name }}</h3>
<p class="text-muted-foreground">Submitted: {{ submitDate.toLocaleString("en-US", {
<p class="text-muted-foreground">Submitted: {{ submitDate?.toLocaleString("en-US", {
year: "numeric",
month: "long",
day: "numeric",