constrast + bug fixes
This commit is contained in:
parent
5a48d5a2bb
commit
8e1e90761b
@ -7,7 +7,7 @@
|
||||
--text-color: #000000;
|
||||
--bg-color: #e9e9e9;
|
||||
--hover-bg-color: #e0e0e0;
|
||||
--separator-line-color: #d0d0d0;
|
||||
--separator-line-color: #a0a0a0;
|
||||
--low-emphasis-text-color: #6b6b6b;
|
||||
--primary-color: #1F96F3;
|
||||
--dull-primary-color: #51aaf0;
|
||||
@ -22,7 +22,7 @@
|
||||
--text-color: #f4f4f4;
|
||||
--bg-color: #0c0c0c;
|
||||
--hover-bg-color: #2c2e2e;
|
||||
--separator-line-color: #2e343d;
|
||||
--separator-line-color: #4e545d;
|
||||
--low-emphasis-text-color: #999999;
|
||||
--primary-color: #1F96F3;
|
||||
--dull-primary-color: #1569ab;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { type Actions, error, fail, redirect } from '@sveltejs/kit';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { editApplication, getEditApplicationPageData } from '$lib/db/index.server';
|
||||
import { getUserId, getUserPerms } from '$lib/index.server';
|
||||
import { getUserPerms } from '$lib/index.server';
|
||||
import { PERMISSIONS } from '$lib/consts';
|
||||
import type { Application } from '$lib/types';
|
||||
|
||||
@ -21,7 +21,7 @@ export const load: PageServerLoad = async ({ url, cookies }) => {
|
||||
|
||||
export const actions: Actions = {
|
||||
// Application submission
|
||||
submit: async ({ request, cookies, params, url }) => {
|
||||
submit: async ({ request, cookies, url }) => {
|
||||
// Permission check (apply perm)
|
||||
if (!((getUserPerms(cookies) & PERMISSIONS.APPLY_FOR_JOBS) > 0)) {
|
||||
return fail(403, { errorMessage: 'Unauthorized' });
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
{/if}
|
||||
<button
|
||||
class="dull-primary-bg-color mb-4 mt-6 rounded px-2 py-1"
|
||||
formaction="?/submit"
|
||||
formaction="?/submit&id={data.application.id}"
|
||||
type="submit"
|
||||
>Save application
|
||||
</button>
|
||||
|
||||
@ -66,10 +66,10 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex">
|
||||
<div class="right-border inline-block {wideScreen.current ? 'w-1/3' : 'w-full'}">
|
||||
<div class="right-border top-border inline-block {wideScreen.current ? 'w-1/3' : 'w-full'}">
|
||||
{#each data.postings as posting}
|
||||
<button
|
||||
class="bottom-border block w-full p-4 text-left {details?.id === posting.id
|
||||
class="bottom-border left-border block w-full p-4 text-left {details?.id === posting.id
|
||||
? 'accent-bg-color'
|
||||
: 'hover-bg-color'}"
|
||||
onclick={() => {
|
||||
|
||||
@ -69,39 +69,41 @@
|
||||
<div class="material-symbols-outlined p-4">arrow_drop_down</div>
|
||||
</button>
|
||||
<div class="panel hidden p-2">
|
||||
<div class="flex justify-between">
|
||||
<div class="inline-block min-w-max pr-4">
|
||||
{#if application.user?.email}
|
||||
<p>Email: {application.user.email}</p>
|
||||
{/if}
|
||||
{#if application.user?.phone}
|
||||
<p>Phone: {application.user.phone}</p>
|
||||
{/if}
|
||||
{#if application.createdAt}
|
||||
<p>
|
||||
Applied: {application.createdAt.toLocaleDateString('en-US', dateFormatOptions)}
|
||||
</p>
|
||||
{/if}
|
||||
{#if application.user?.resume}
|
||||
<a
|
||||
class="hyperlink-underline hyperlink-color"
|
||||
href="/uploads/resumes/{application.user.id}.pdf"
|
||||
target="_blank"
|
||||
>
|
||||
Résumé
|
||||
</a>
|
||||
{/if}
|
||||
<div class="flex w-full items-start justify-between">
|
||||
<div class="flex">
|
||||
<div class="inline-block min-w-max pr-4">
|
||||
{#if application.user?.email}
|
||||
<p>Email: {application.user.email}</p>
|
||||
{/if}
|
||||
{#if application.user?.phone}
|
||||
<p>Phone: {application.user.phone}</p>
|
||||
{/if}
|
||||
{#if application.createdAt}
|
||||
<p>
|
||||
Applied: {application.createdAt.toLocaleDateString('en-US', dateFormatOptions)}
|
||||
</p>
|
||||
{/if}
|
||||
{#if application.user?.resume}
|
||||
<a
|
||||
class="hyperlink-underline hyperlink-color"
|
||||
href="/uploads/resumes/{application.user.id}.pdf"
|
||||
target="_blank"
|
||||
>
|
||||
Résumé
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="left-border inline-block pl-4">
|
||||
<h2>Candidate Statement</h2>
|
||||
<h3 class="low-emphasis-text">
|
||||
Why do you believe you are the best fit for this role?
|
||||
</h3>
|
||||
<p class="whitespace-pre-wrap">{application.candidateStatement}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left-border inline-block pl-4">
|
||||
<h2>Candidate Statement</h2>
|
||||
<h3 class="low-emphasis-text">
|
||||
Why do you believe you are the best fit for this role?
|
||||
</h3>
|
||||
<p class="whitespace-pre-wrap">{application.candidateStatement}</p>
|
||||
</div>
|
||||
<form method="POST">
|
||||
<form method="POST" class="inline-block">
|
||||
<button
|
||||
class="material-symbols-outlined danger-color inline-block p-1 align-top"
|
||||
class="material-symbols-outlined danger-color inline-block p-2 align-top"
|
||||
type="submit"
|
||||
formaction="?/delete&id={application.id}"
|
||||
>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
<div class="base-container">
|
||||
<div class="content">
|
||||
<div class="elevated separator-borders m-4 rounded">
|
||||
<div class="elevated separator-borders my-2 rounded">
|
||||
<div class="bottom-border flex place-content-between">
|
||||
<div class="p-3 font-semibold">Edit {data.posting.title}</div>
|
||||
</div>
|
||||
@ -147,10 +147,7 @@
|
||||
<p>This will permanently delete this posting. This action cannot be undone.</p>
|
||||
|
||||
<div class="mt-4 flex justify-between">
|
||||
<button
|
||||
class="danger-bg-color rounded px-2 py-1"
|
||||
formaction="?/delete"
|
||||
type="submit"
|
||||
<button class="danger-bg-color rounded px-2 py-1" formaction="?/delete" type="submit"
|
||||
>Delete posting
|
||||
</button>
|
||||
<button
|
||||
|
||||
Loading…
Reference in New Issue
Block a user