diff --git a/src/app/apply/staff/page.tsx b/src/app/apply/staff/page.tsx index 91573bd5..f1efe8f6 100644 --- a/src/app/apply/staff/page.tsx +++ b/src/app/apply/staff/page.tsx @@ -1,8 +1,9 @@ import { redirect } from "next/navigation"; +import { applyStaff } from "@/actions/applications"; +import { ContentCard, EmptyState } from "@/components/public/ui"; import { auth } from "@/lib/auth"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; -import { applyStaff } from "@/actions/applications"; export const dynamic = "force-dynamic"; @@ -48,39 +49,29 @@ export default async function ApplyStaffPage() { const appliedRankIds = new Set(myApps.map((a) => a.rankId)); return ( -
-
-

Apply for {hotelName} staff

-

- We open staff applications every now and then. If you come across a position you feel you - would fit perfectly into, do not hesitate to apply for it. -

-
+
+ {positions.length === 0 ? ( -
-

No positions open

-

+ + There are currently no positions open. Please come back at a later time to check if we have any openings by then. Thank you for your interest. -

-
+ +
) : ( -
+
{positions.map((position) => { const team = teamByRankId.get(position.permissionId); const rankName = team?.rankName ?? `Rank #${position.permissionId}`; const alreadyApplied = appliedRankIds.has(position.permissionId); return ( -
-
+
+
{team?.badge ? ( /* eslint-disable-next-line @next/next/no-img-element */ - ) : null} -
-

{rankName}

+ ) : ( + + ๐Ÿ›ก๏ธ + + )} +
+

+ {rankName} +

{team?.jobDescription ? ( -

- {team.jobDescription} -

+

{team.jobDescription}

) : null}
-

{position.description}

-

- Application deadline: {formatDeadline(position.applyTo)} -

+
+

{position.description}

+

+ Application deadline: {formatDeadline(position.applyTo)} +

- {alreadyApplied ? ( - - ) : ( -
- {/* rank_id is the position's permission id; the applicant is - re-read from the session inside the action. */} - - -