feat: cv verifier

This commit is contained in:
Alexander Daichendt 2025-01-01 14:00:05 +01:00
parent 4dd699f08c
commit 194b4b0808
24 changed files with 2199 additions and 70 deletions

View file

@ -0,0 +1,51 @@
---
import type { InferSelectModel } from "drizzle-orm";
import type { cvTable } from "../../db/schema";
interface Props {
cv: InferSelectModel<typeof cvTable>;
}
const { cv } = Astro.props;
---
<div class="bg-gray-50 dark:bg-gray-700/50 rounded-lg p-6">
<ul class="space-y-4 mb-0">
<li class="flex items-start">
<span class="text-gray-500 dark:text-gray-400 min-w-32"> UUID: </span>
<span class="text-gray-800 dark:text-gray-200 font-medium">
{cv.uuid}
</span>
</li>
<li class="flex items-start">
<span class="text-gray-500 dark:text-gray-400 min-w-32">
Issued by:
</span>
<span class="text-gray-800 dark:text-gray-200 font-medium">
{cv.author}
</span>
</li>
<li class="flex items-start">
<span class="text-gray-500 dark:text-gray-400 min-w-32">
Issued to:
</span>
<span class="text-gray-800 dark:text-gray-200 font-medium">
{cv.company_name}
</span>
</li>
<li class="flex items-start">
<span class="text-gray-500 dark:text-gray-400 min-w-32">
Issue date:
</span>
<span class="text-gray-800 dark:text-gray-200 font-medium">
{cv.created?.toLocaleString()}
</span>
</li>
<li class="flex items-start">
<span class="text-gray-500 dark:text-gray-400 min-w-32"> Purpose: </span>
<span class="text-gray-800 dark:text-gray-200 font-medium">
{cv.purpose}
</span>
</li>
</ul>
</div>

View file

@ -0,0 +1,5 @@
<div class="text-center p-8 bg-red-50 dark:bg-red-950 rounded-lg shadow-sm">
<p class="text-red-600 dark:text-red-400 text-lg font-medium">
No CV found with this UUID.
</p>
</div>

View file

@ -0,0 +1,20 @@
<div class="flex items-center justify-center gap-2 mb-4">
<div class="bg-red-100 dark:bg-red-900 p-2 rounded-full">
<svg
class="w-6 h-6 text-red-600 dark:text-red-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"></path>
</svg>
</div>
<h2 class="text-2xl font-bold text-red-600 dark:text-red-400">Revoked CV</h2>
</div>
<p class="text-red-600 dark:text-red-400 text-lg">
This CV has been revoked and is no longer valid.
</p>

View file

@ -0,0 +1,36 @@
---
import type { InferSelectModel } from "drizzle-orm";
import type { cvTable } from "../../db/schema";
interface Props {
cv: InferSelectModel<typeof cvTable>;
}
const { cv } = Astro.props;
---
<div class="flex items-center gap-2 mb-6">
<div class="bg-green-100 dark:bg-green-900 p-2 rounded-full">
<svg
class="w-6 h-6 text-green-600 dark:text-green-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 13l4 4L19 7"></path>
</svg>
</div>
<h2 class="text-2xl font-bold text-gray-800 dark:text-gray-100">
Verified CV
</h2>
</div>
<p class="text-gray-600 dark:text-gray-300 mb-6">
This CV was issued and verified by
<span class="font-semibold">{cv.author}</span>, for{" "}
<span class="font-semibold">{cv.company_name}</span>
</p>