added user suggestions
All checks were successful
ci / docker_image (push) Successful in 1m37s
ci / deploy (push) Successful in 17s

This commit is contained in:
Drake Marino 2025-03-22 15:34:33 -05:00
parent 8932165f7b
commit 4f9e770270
11 changed files with 121 additions and 101 deletions

View File

@ -378,8 +378,12 @@ h2 {
max-width: 200ch;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5; /* Adjust the number of lines as needed */
-webkit-box-orient: vertical;
}
::-webkit-scrollbar-track {
background: var(--bg-color);
}
@ -405,7 +409,7 @@ h2 {
}
.details-height {
max-height: calc(100vh - 265px);
max-height: calc(100vh - 314px);
}
.top-with-navbar {

View File

@ -18,8 +18,7 @@
>Create new company</a
>
</div>
<form action="" class="px-4">
<div class="flex py-4">
<form action="" class="flex p-4">
<div class="search-bar">
<input
type="search"
@ -38,7 +37,6 @@
<!-- >Sort<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
</div>
</form>
<div class="table">
<table>

View File

@ -20,8 +20,7 @@
>Create new posting</a
>
</div>
<form action="" class="px-4">
<div class="flex py-4">
<form action="" class="flex p-4">
<div class="search-bar">
<input
type="search"
@ -40,7 +39,6 @@
<!-- >Sort<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
</div>
</form>
<div class="table">
<table>

View File

@ -18,8 +18,7 @@
>Create new tag</a
>
</div>
<form action="" class="px-4">
<div class="flex py-4">
<form action="" class="flex p-4">
<div class="search-bar">
<input
type="search"
@ -38,7 +37,6 @@
<!-- >Sort<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
</div>
</form>
<div class="table">
<table>

View File

@ -26,8 +26,7 @@
>Create new user</a
>
</div>
<form action="" class="px-4">
<div class="flex py-4">
<form action="" class="flex p-4">
<div class="search-bar">
<input
type="search"
@ -46,7 +45,6 @@
<!-- >Sort<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
</div>
</form>
<div class="table">
<table>

View File

@ -25,9 +25,9 @@
{/if}
</div>
{#each data.companies as company}
<a class="top-border hover-bg-color inline-block w-full p-3" href="/companies/{company.id}">
<a class="top-border hover-bg-color flex w-full p-3" href="/companies/{company.id}">
<img
class="mb-2 inline-block rounded-lg"
class="mb-2 inline-block h-16 rounded-lg"
src="/uploads/logos/{company.id}.jpg?timestamp=${Date.now()}"
alt="Company logo"
onerror={(e) => logoFallback(e, company)}

View File

@ -21,14 +21,14 @@
<div class="base-container">
<div class="content py-4">
<div class="bottom-border mb-4 flex justify-between">
<div class="inline-block">
<div class="flex">
<img
class="mb-2 inline-block rounded-lg"
class="mb-2 inline-block h-32 rounded-lg"
src="/uploads/logos/{data.company.id}.jpg?timestamp=${Date.now()}"
alt="User avatar"
onerror={logoFallback}
height="120"
width="120"
height="128"
width="128"
/>
<div class="inline-block h-min pl-4">
<h1 class="font-bold">{data.company.name}</h1>
@ -36,7 +36,7 @@
</div>
</div>
{#if (userState.perms & PERMISSIONS.MANAGE_COMPANIES) > 0 || ((userState.perms & PERMISSIONS.MANAGE_EMPLOYERS) !== 0 && userState.companyId === data.company.id)}
<div class="inline-block">
<div class="mt-1 inline-block min-w-max">
<a
class="dull-primary-bg-color rounded px-3 py-1.5"
href="/companies/{data.company.id}/edit">Edit company</a
@ -52,10 +52,10 @@
: data.company.name + ' has no current postings!'}
</div>
{#each data.postings as posting}
<a class="top-border hover-bg-color block p-2" href="/postings/{posting.id}">
<a class="top-border hover-bg-color flex p-2" href="/postings/{posting.id}">
<img
class="inline-block rounded"
src="/uploads/logos/{posting.companyId ? posting.companyId : 'default'}.jpg"
class="inline-block h-12 rounded"
src="/uploads/logos/{data.company.id}.jpg"
alt="Company Logo"
height="48"
width="48"
@ -63,7 +63,7 @@
/>
<div class="inline-block pl-2 align-top">
<h2 class="font-semibold">{posting.title}</h2>
<h3 class="max-char-length">{posting.description}</h3>
<h3 class="max-char-length whitespace-pre-wrap">{posting.description}</h3>
</div>
</a>
{/each}

View File

@ -37,7 +37,7 @@
<div class="base-container">
<div class="content">
<div class="bottom-border mb-4 flex justify-between pb-2">
<div class="bottom-border flex justify-between pb-2">
<h1 class="inline-block p-2">Postings</h1>
{#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"
@ -45,20 +45,40 @@
>
{/if}
</div>
<form action="" class="flex p-4">
<div class="search-bar">
<input
type="search"
name="searchQuery"
id="searchQuery"
placeholder="Search Postings"
class="search-cancel"
/>
<button><span class="material-symbols-outlined">search</span></button>
</div>
<!-- <button class="hover-bg-color mx-2 rounded py-2 pl-3 pr-2 text-sm"-->
<!-- >Filter<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
<!-- <button class="hover-bg-color rounded py-2 pl-3 pr-2 text-sm"-->
<!-- >Sort<span class="material-symbols-outlined icon-20 align-middle">arrow_drop_down</span-->
<!-- ></button-->
<!-- >-->
</form>
<div class="flex">
<div class="right-border inline-block w-1/3">
{#each data.postings as posting}
<button
class="bottom-border block w-full p-4 text-left {details?.id === posting.id
? 'accent-bg-color'
: ''}"
: 'hover-bg-color'}"
onclick={() => {
fetchDetails(posting.id);
}}
>
<img
class="inline-block rounded"
src="/uploads/logos/{posting.companyId}.png"
src="/uploads/logos/{posting.companyId}.jpg"
alt="Company Logo"
height="48"
width="48"
@ -79,7 +99,7 @@
<div class="inline-block">
<img
class="inline-block rounded"
src="/uploads/logos/{details.companyId || 'default'}.jpg"
src="/uploads/logos/{details.company.id || 'default'}.jpg"
alt="Company Logo"
height="64"
width="64"
@ -87,7 +107,9 @@
/>
<div class="inline-block pl-2 align-top">
<h1>{details.title}</h1>
<h2>Company: {details.company.name}</h2>
<a href="/companies/{details.company.id}" class="hover-hyperlink text-xl"
>{details.company.name}</a
>
</div>
</div>
{#if userState.perms >= 0 && ((userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0 || ((userState.perms & PERMISSIONS.SUBMIT_POSTINGS) > 0 && userState.companyId === details.company.id))}

View File

@ -25,7 +25,7 @@
<div class="inline-block">
<img
class="inline-block rounded"
src="/uploads/logos/{data.posting.companyId || 'default'}.jpg"
src="/uploads/logos/{data.posting.company.id}.jpg"
alt="Company Logo"
height="64"
width="64"
@ -33,7 +33,9 @@
/>
<div class="inline-block pl-2 align-top">
<h1>{data.posting.title}</h1>
<h2>Company: {data.posting.company.name}</h2>
<a href="/companies/{data.posting.company.id}" class="hover-hyperlink text-xl"
>{data.posting.company.name}</a
>
</div>
</div>
{#if userState.perms >= 0 && ((userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0 || ((userState.perms & PERMISSIONS.SUBMIT_POSTINGS) > 0 && userState.companyId === data.posting.company.id))}

View File

@ -57,7 +57,7 @@ export const actions: Actions = {
return fail(400, { errorMessage: `Internal Server Error: ${err}` });
}
setJWT(cookies, user);
throw redirect(303, '/');
throw redirect(303, '/account');
} else {
return fail(400, { errorMessage: 'Passwords do not match' });
}

View File

@ -30,7 +30,7 @@ export const actions: Actions = {
setJWT(cookies, user);
await updateLastSignin(username);
// redirect to home page
throw redirect(303, '/');
throw redirect(303, '/account');
} else {
return fail(400, { errorMessage: 'Missing username or password' });
}