Skip to content

Commit 41919b1

Browse files
committed
chore: fmt
1 parent 604d0aa commit 41919b1

File tree

10 files changed

+115
-101
lines changed

10 files changed

+115
-101
lines changed

content/training/get-training.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Welcome to VATMENA, and welcome to your vACC of choice! This guide will help you
88

99
## Facility Policy Disclaimer
1010

11-
This guide is a general, technical guide about how to navigate the *typical* process of training in facilities that use Hayya's system.
11+
This guide is a general, technical guide about how to navigate the _typical_ process of training in facilities that use Hayya's system.
1212
Facilities may have their own alterations or specific restrictions to this process, and they may not use Hayya's system at all.
1313
Make sure to read over and fully understand your facilities administrative policies before attempting to request training.
1414

1515
## Getting started
1616

17-
First, you need to join a training plan. Follow the instructions outlined in [Training Plans - Joining Training Plans](/docs/training/training-plans#joining-training-plans)!
17+
First, you need to join a training plan. Follow the instructions outlined in [Training Plans - Joining Training Plans](/docs/training/training-plans#joining-training-plans)!

content/training/overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ At the moment, only some portions of the planned training system have been imple
1212
First, determine if your facility utilizes Hayya for training.
1313

1414
| Facility | Uses Hayya |
15-
|------------------------|------------|
15+
| ---------------------- | ---------- |
1616
| Arabian vACC | Unknown |
1717
| Egyptian vACC | Unknown |
1818
| Iran vACC | Unknown |
@@ -21,12 +21,12 @@ First, determine if your facility utilizes Hayya for training.
2121
| North East Africa vACC | Unknown |
2222
| Saudi Arabia vACC | Unknown |
2323

24-
*Data last updated 8/17/2024, and subject to change as facilities adopt the new system*
24+
_Data last updated 8/17/2024, and subject to change as facilities adopt the new system_
2525

2626
Find your desired facility above, and consult the chart below for what to do next.
2727

2828
| If your facility's status is... | ...it means... | ...and you should: |
29-
|---------------------------------|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
29+
| ------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
3030
| Unknown | The facility has not yet advised MENATECH on whether they wish to utilize Hayya's training system | Contact your facility staff directly to initiate training |
3131
| No | The facility has decided not to use Hayya | Contact your facility staff directly. You will not be able to log into Hayya. |
32-
| Yes | The facility uses Hayya! | [Learn how to get trained with Hayya](/training/get-training) |
32+
| Yes | The facility uses Hayya! | [Learn how to get trained with Hayya](/training/get-training) |

content/training/training-plans.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import Steps from "$lib/docs/components/Steps.svelte";
1313
With the release of the Training V2 system overhaul, Hayya is introducing a new system, the Training Plan system. Training plans intend to be a more consolidated and concise method of showing your facilities training tracks and to allow you to easily register for and begin requesting training along these tracks.
1414

1515
## Joining Training Plans
16-
*This section continues the Get Training tutorial. You're on step 1!*
1716

18-
_Join Training Plan (you are here) - [(next) Create Training Request →](/docs/training/training-requests#create-a-request)_
17+
_This section continues the Get Training tutorial. You're on step 1!_
1918

19+
_Join Training Plan (you are here) - [(next) Create Training Request →](/docs/training/training-requests#create-a-request)_
2020

2121
<Callout title="Facility assignment required">
2222
To join a training plan, you need to be a home or visiting member of a vACC that uses Hayya.
@@ -37,7 +37,7 @@ Under the message telling you that you're not enrolled in a training plan, click
3737
See a different message?
3838

3939
| Message | Meaning | Action |
40-
|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
40+
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
4141
| You're not currently enrolled in a training plan. | You need to join a plan first. | Continue with these instructions |
4242
| You currently have an outstanding request to join the [ Plan Name ] plan. | Your join was recieved, but a staff member needs to approve it before you're enrolled. | Wait for staff to approve your request, OR click Cancel Request if you want to join a different plan. |
4343
| You're currently enrolled in the [ Plan Name ] plan. | You are already enrolled in a plan. | Request your training OR click Leave Plan to select a different plan. |
@@ -60,7 +60,7 @@ Check back occasionally (no more than once a day) to wait for a decision on your
6060
You'll see one of three messages:
6161

6262
| Message | Meaning | Action |
63-
|---------------------------------------------------------------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
63+
| ------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
6464
| You currently have an outstanding request to join the [ Plan Name ] plan. | Your request is yet to be reviewed. | Keep waiting and check back often. |
6565
| You're currently enrolled in the [ Plan Name ] plan. | Your request was approved. | Read on to start requesting training! |
6666
| You're not currently enrolled in a training plan. | Your request was denied. | You should have recieved some communication from a staff member about the reason for your rejection. Resolve any issues and make a new join request. |
@@ -208,6 +208,6 @@ You will be presented with a table of outstanding join requests. Each entry will
208208

209209
Based on the relevant requirements, make a decision on a user, and select the appropriate action, either Accept or Reject.
210210

211-
*Especially* with rejections, it is highly encouraged you reach out to the user to inform them of your action, as a courtesy, as Hayya itself does not currently notify them when action is taken on their account.
211+
_Especially_ with rejections, it is highly encouraged you reach out to the user to inform them of your action, as a courtesy, as Hayya itself does not currently notify them when action is taken on their account.
212212

213-
</Steps>
213+
</Steps>

content/training/training-requests.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tagline: "Applies to: Students, Mentors"
77
Hayya includes a very similar training request system to Oryx, the previous most popular choice for vACCs within VATMENA.
88

99
## Create a Request
10-
*This section continues the Get Training tutorial. You're on step 2!*
1110

12-
_[&larr; Join Training Plan (prev)](/docs/training/training-plans#joining-training-plans) - Create Training Request (you are here) - [(next) Attend Training Session &rarr;](/docs/training/training-sessions#attending-a-session)_
11+
_This section continues the Get Training tutorial. You're on step 2!_
12+
13+
_[&larr; Join Training Plan (prev)](/docs/training/training-plans#joining-training-plans) - Create Training Request (you are here) - [(next) Attend Training Session &rarr;](/docs/training/training-sessions#attending-a-session)_

src/lib/autil.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function reversed<T>(i: T[]): T[] {
2-
return i.map((e, i, a)=> a[(a.length -1) -i]);
3-
}
2+
return i.map((e, i, a) => a[a.length - 1 - i]);
3+
}

src/lib/config/navigation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const navigation: Navigation = {
6262
{
6363
title: "Get Training",
6464
href: "/docs/training/get-training",
65-
items: []
65+
items: [],
6666
},
6767
{
6868
title: "Training Plans",
@@ -72,8 +72,8 @@ export const navigation: Navigation = {
7272
{
7373
title: "Training Requests",
7474
href: "/docs/training/training-requests",
75-
items: []
76-
}
75+
items: [],
76+
},
7777
],
7878
},
7979
{

src/routes/(hq)/[id]/training/+page.server.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,24 @@ export const load: PageServerLoad = async ({ parent, params }) => {
3939
where: { facilityId: params.id },
4040
include: { TrainingPlanRegistration: true },
4141
}),
42-
sessions: reversed(await prisma.trainingSession.findMany({
43-
where: { studentId: user.id },
44-
include: {
45-
plan: true,
46-
mentor: true,
47-
},
48-
})),
49-
mentorSessions: reversed(await prisma.trainingSession.findMany({
50-
where: { mentorId: user.id },
51-
include: {
52-
plan: true,
53-
student: true,
54-
},
55-
})),
42+
sessions: reversed(
43+
await prisma.trainingSession.findMany({
44+
where: { studentId: user.id },
45+
include: {
46+
plan: true,
47+
mentor: true,
48+
},
49+
}),
50+
),
51+
mentorSessions: reversed(
52+
await prisma.trainingSession.findMany({
53+
where: { mentorId: user.id },
54+
include: {
55+
plan: true,
56+
student: true,
57+
},
58+
}),
59+
),
5660
requestForm: await superValidate(zod(requestSchema)),
5761
};
5862
};

src/routes/(hq)/[id]/training/+page.svelte

Lines changed: 67 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -229,67 +229,67 @@
229229
</Card.Content>
230230
</Card.Root>
231231

232-
<Card.Root class="sm:w-full md:w-[50vw]">
233-
<Card.Header>
234-
<Card.Title>Your Sessions</Card.Title>
235-
</Card.Header>
236-
<Card.Content>
237-
{#if data.sessions.length === 0}
238-
<p>You haven't had any sessions yet.</p>
239-
{:else}
240-
<ScrollArea class="h-[33vh]">
241-
<ScrollArea>
242-
<Table.Root>
243-
<Table.Header>
232+
<Card.Root class="sm:w-full md:w-[50vw]">
233+
<Card.Header>
234+
<Card.Title>Your Sessions</Card.Title>
235+
</Card.Header>
236+
<Card.Content>
237+
{#if data.sessions.length === 0}
238+
<p>You haven't had any sessions yet.</p>
239+
{:else}
240+
<ScrollArea class="h-[33vh]">
241+
<ScrollArea>
242+
<Table.Root>
243+
<Table.Header>
244+
<Table.Row>
245+
<Table.Head>Type</Table.Head>
246+
<Table.Head>Date</Table.Head>
247+
<Table.Head>Status</Table.Head>
248+
<Table.Head>Mentor</Table.Head>
249+
<Table.Head>Actions</Table.Head>
250+
</Table.Row>
251+
</Table.Header>
252+
<Table.Body>
253+
{#each data.sessions as session}
244254
<Table.Row>
245-
<Table.Head>Type</Table.Head>
246-
<Table.Head>Date</Table.Head>
247-
<Table.Head>Status</Table.Head>
248-
<Table.Head>Mentor</Table.Head>
249-
<Table.Head>Actions</Table.Head>
255+
<Table.Cell>{session.plan.name}</Table.Cell>
256+
<Table.Cell>
257+
{humanReadableDate(session.scheduledTime)}
258+
</Table.Cell>
259+
<Table.Cell>
260+
{#if session.status === "Scheduled"}
261+
<Badge>
262+
<ClockIcon class="mr-2 h-4 w-4" />
263+
Scheduled
264+
</Badge>
265+
{:else if session.status === "Incomplete"}
266+
<Badge class="bg-yellow-300">
267+
<XIcon class="mr-2 h-4 w-4" />
268+
Incomplete
269+
</Badge>
270+
{:else if session.status === "Complete"}
271+
<Badge class="bg-green-400">
272+
<CheckIcon class="mr-2 h-4 w-4" />
273+
Complete
274+
</Badge>
275+
{/if}
276+
</Table.Cell>
277+
<Table.Cell>{session.mentor.name}</Table.Cell>
278+
<Table.Cell>
279+
<Button href="/{$page.params.id}/training/{session.id}">
280+
<EyeIcon class="mr-2 h-4 w-4" />
281+
View
282+
</Button>
283+
</Table.Cell>
250284
</Table.Row>
251-
</Table.Header>
252-
<Table.Body>
253-
{#each data.sessions as session}
254-
<Table.Row>
255-
<Table.Cell>{session.plan.name}</Table.Cell>
256-
<Table.Cell>
257-
{humanReadableDate(session.scheduledTime)}
258-
</Table.Cell>
259-
<Table.Cell>
260-
{#if session.status === "Scheduled"}
261-
<Badge>
262-
<ClockIcon class="mr-2 h-4 w-4" />
263-
Scheduled
264-
</Badge>
265-
{:else if session.status === "Incomplete"}
266-
<Badge class="bg-yellow-300">
267-
<XIcon class="mr-2 h-4 w-4" />
268-
Incomplete
269-
</Badge>
270-
{:else if session.status === "Complete"}
271-
<Badge class="bg-green-400">
272-
<CheckIcon class="mr-2 h-4 w-4" />
273-
Complete
274-
</Badge>
275-
{/if}
276-
</Table.Cell>
277-
<Table.Cell>{session.mentor.name}</Table.Cell>
278-
<Table.Cell>
279-
<Button href="/{$page.params.id}/training/{session.id}">
280-
<EyeIcon class="mr-2 h-4 w-4" />
281-
View
282-
</Button>
283-
</Table.Cell>
284-
</Table.Row>
285-
{/each}
286-
</Table.Body>
287-
</Table.Root>
288-
</ScrollArea>
285+
{/each}
286+
</Table.Body>
287+
</Table.Root>
289288
</ScrollArea>
290-
{/if}
291-
</Card.Content>
292-
</Card.Root>
289+
</ScrollArea>
290+
{/if}
291+
</Card.Content>
292+
</Card.Root>
293293

294294
{#if can(MANAGE_TRAINING_PLANS) || can(MANAGE_PLAN_ENROLLMENT_REQUESTS)}
295295
<Card.Root class="sm:w-full md:w-[50vw]">
@@ -341,10 +341,17 @@
341341

342342
<div class="flex w-full flex-col gap-1.5">
343343
<Label for="email">VATSIM ID</Label>
344-
<Input bind:value={transcriptCid} type="number" id="cid" placeholder="1710004" />
344+
<Input
345+
bind:value={transcriptCid}
346+
type="number"
347+
id="cid"
348+
placeholder="1710004" />
345349
</div>
346350

347-
<Button href="/{$page.params.id}/training/transcript/{transcriptCid}/">View</Button>
351+
<Button
352+
href="/{$page.params.id}/training/transcript/{transcriptCid}/">
353+
View
354+
</Button>
348355
</Dialog.Header>
349356
</Dialog.Content>
350357
</Dialog.Root>

src/routes/(hq)/[id]/training/[sessionId]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
<div class="h-min">
175175
<Textarea
176176
bind:value={comment}
177-
class="resize-none h-32"
177+
class="h-32 resize-none"
178178
placeholder="Enter your comment here. You can use Markdown to add links and styles." />
179179
<Button on:click={addComment} class="mt-2">Add Comment</Button>
180180
</div>

src/routes/(hq)/[id]/training/transcript/[studentId]/+page.server.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ export const load: PageServerLoad = async ({ params, cookies }) => {
3030

3131
return {
3232
student,
33-
sessions: reversed(await prisma.trainingSession.findMany({
34-
where: { studentId: params.studentId },
35-
include: {
36-
plan: true,
37-
mentor: true,
38-
},
39-
})),
33+
sessions: reversed(
34+
await prisma.trainingSession.findMany({
35+
where: { studentId: params.studentId },
36+
include: {
37+
plan: true,
38+
mentor: true,
39+
},
40+
}),
41+
),
4042
};
4143
};

0 commit comments

Comments
 (0)