fixes from suggestions
This commit is contained in:
parent
3b428215e3
commit
8cec569f22
@ -215,7 +215,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="font-semibold">Résumé:</div>
|
<div class="font-semibold">Résumé:</div>
|
||||||
{#if resumeState}
|
{#if resumeState}
|
||||||
<a class="pb-2" href="/uploads/resumes/{data.user.id}.pdf">
|
<a class="pb-2" href="/uploads/resumes/{data.user.id}.pdf" target="_blank">
|
||||||
<button class="dull-primary-bg-color rounded-md px-2.5 py-1"
|
<button class="dull-primary-bg-color rounded-md px-2.5 py-1"
|
||||||
><span class="material-symbols-outlined align-middle">open_in_new</span> View résumé</button
|
><span class="material-symbols-outlined align-middle">open_in_new</span> View résumé</button
|
||||||
>
|
>
|
||||||
@ -249,10 +249,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="font-semibold">
|
<div class="font-semibold">
|
||||||
Applied on: <span class="font-normal"
|
Applied on: <span class="font-normal"
|
||||||
>{data.applications[0].createdAt.toLocaleDateString(
|
>{application.createdAt.toLocaleDateString('en-US', dateFormatOptions)}</span
|
||||||
'en-US',
|
|
||||||
dateFormatOptions
|
|
||||||
)}</span
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { type Actions, fail, redirect } from '@sveltejs/kit';
|
|||||||
import { PERMISSIONS } from '$lib/consts';
|
import { PERMISSIONS } from '$lib/consts';
|
||||||
import { getUserId } from '$lib/index.server';
|
import { getUserId } from '$lib/index.server';
|
||||||
import type { User } from '$lib/types';
|
import type { User } from '$lib/types';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
export const load: PageServerLoad = async ({ cookies }) => {
|
export const load: PageServerLoad = async ({ cookies }) => {
|
||||||
const id = getUserId(cookies);
|
const id = getUserId(cookies);
|
||||||
@ -55,6 +56,8 @@ export const actions: Actions = {
|
|||||||
const id = getUserId(cookies);
|
const id = getUserId(cookies);
|
||||||
try {
|
try {
|
||||||
await deleteUser(id);
|
await deleteUser(id);
|
||||||
|
cookies.delete('jwt', { path: '/' });
|
||||||
|
return redirect(301, `/signin`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return fail(500, { errorMessage: `Internal Server Error: ${err}` });
|
return fail(500, { errorMessage: `Internal Server Error: ${err}` });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -187,6 +187,7 @@
|
|||||||
placeholder="I understand"
|
placeholder="I understand"
|
||||||
class="w-full rounded font-normal"
|
class="w-full rounded font-normal"
|
||||||
pattern="I understand"
|
pattern="I understand"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<div class="mt-4 flex justify-between">
|
<div class="mt-4 flex justify-between">
|
||||||
<button class="danger-bg-color rounded px-2 py-1" type="submit" formaction="?/delete"
|
<button class="danger-bg-color rounded px-2 py-1" type="submit" formaction="?/delete"
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<div class="base-container">
|
<div class="base-container">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="bottom-border flex justify-between pb-2">
|
<div class="bottom-border flex justify-between pb-2">
|
||||||
<h1 class="inline-block p-2">Postings</h1>
|
<h1 class="inline-block p-2">Job Postings</h1>
|
||||||
{#if userState.companyId && (userState.perms & PERMISSIONS.SUBMIT_POSTINGS) > 0}
|
{#if userState.companyId && (userState.perms & PERMISSIONS.SUBMIT_POSTINGS) > 0}
|
||||||
<a class="dull-primary-bg-color m-2 h-min rounded-md px-2.5 py-1" href="/postings/create"
|
<a class="dull-primary-bg-color m-2 h-min rounded-md px-2.5 py-1" href="/postings/create"
|
||||||
>Create new posting</a
|
>Create new posting</a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user