prod
This commit is contained in:
@@ -7,6 +7,7 @@ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, D
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { Spinner } from "@/components/ui/spinner";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { approveApplication, rejectApplication } from "@/lib/citizenship/actions";
|
||||
import { CitizenshipApplicationWithWarning } from "@/lib/citizenship/types";
|
||||
import { formatDate } from "@/lib/utils";
|
||||
@@ -22,7 +23,7 @@ export default function ApplicationCard({ application, onClose }: { application:
|
||||
|
||||
if (!application?.id) {
|
||||
return (
|
||||
<div className="w-sm flex items-center justify-center ring-1 ring-foreground/10 rounded-xl text-muted-foreground px-4">
|
||||
<div className="max-w-sm w-full flex items-center justify-center ring-1 ring-foreground/10 rounded-xl text-muted-foreground px-4 py-1">
|
||||
Click on a row to see the application
|
||||
</div>
|
||||
)
|
||||
@@ -64,18 +65,14 @@ export default function ApplicationCard({ application, onClose }: { application:
|
||||
<CardDescription>{application.applicationType === "PREVIOUS_CITIZENSHIP" ? "Previous citizenship application" : "Naturalization application"}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="max-w-sm">
|
||||
<div className="flex flex-row gap-2 mb-2">
|
||||
<img
|
||||
src={application.profileUrl}
|
||||
alt="Profile"
|
||||
className={"w-18 h-24 rounded-md object-cover ring-1 ring-foreground/10 shrink-0"}
|
||||
/>
|
||||
<img
|
||||
src={application.signatureUrl}
|
||||
alt="Profile"
|
||||
className={"w-36 h-18 rounded-md object-cover ring-1 ring-foreground/10 shrink-0"}
|
||||
/>
|
||||
<div className="flex flex-row gap-3 mb-4">
|
||||
<div className="w-20 aspect-4/5 rounded-md overflow-hidden ring-1 ring-foreground/10 shrink-0">
|
||||
<img src={application.profileUrl} alt="Profile photo" className="w-full h-full object-cover" />
|
||||
</div>
|
||||
<div className="w-40 px-2 aspect-5/2 rounded-md overflow-hidden ring-1 ring-foreground/10 shrink-0 bg-white">
|
||||
<img src={application.signatureUrl} alt="Signature" className="w-full h-full object-contain" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<h4 className="mb-1">Personal information</h4>
|
||||
{ application.nameMismatch && (
|
||||
@@ -110,7 +107,14 @@ export default function ApplicationCard({ application, onClose }: { application:
|
||||
</div>
|
||||
<div className="flex flex-col gap-0.5">
|
||||
<p className="text-muted-foreground">Address</p>
|
||||
<p className="truncate">{application.address}</p>
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<p className="text-start truncate">{application.address}</p>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p>{application.address}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div className="flex flex-row gap-4 items-center">
|
||||
<p className="text-muted-foreground">Height</p>
|
||||
@@ -169,7 +173,7 @@ export default function ApplicationCard({ application, onClose }: { application:
|
||||
/>
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={() => setRejectOpen(false)}>Cancel</Button>
|
||||
<Button variant="destructive" onClick={handleReject} disabled={!reason.trim() || isloading}>
|
||||
<Button onClick={handleReject} disabled={!reason.trim() || isloading}>
|
||||
{isloading && <Spinner />}Confirm rejection
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
Reference in New Issue
Block a user