mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-30 06:20:24 +00:00
add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
This commit is contained in:
@ -32,7 +32,9 @@ export function UserVerifyDialog({ user }: { user: UserProfile }) {
|
||||
</DialogTrigger>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle className="text-muted-foreground">Verify User</DialogTitle>
|
||||
<DialogTitle className="text-muted-foreground">
|
||||
Verify User
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
Are you sure you want to verify the following user?
|
||||
<span className="inline-block my-4">
|
||||
@ -60,19 +62,24 @@ export function UserVerifyDialog({ user }: { user: UserProfile }) {
|
||||
setOpen(true);
|
||||
setDisabled(true);
|
||||
const res = await verifyUser(String(userId));
|
||||
if (res.ok) toast.success('User Verified!');
|
||||
else toast.warning(res.error, {
|
||||
description: <div>
|
||||
<p className="italic">The following fields do not match</p>
|
||||
<ul className="list-disc list-inside p-2">
|
||||
{res.mismatch_fields?.map((field) => (
|
||||
<li key={field}>{field}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>,
|
||||
closeButton: true,
|
||||
duration: 10000,
|
||||
});
|
||||
if (res.ok) toast.success("User Verified!");
|
||||
else
|
||||
toast.warning(res.error, {
|
||||
description: (
|
||||
<div>
|
||||
<p className="italic">
|
||||
The following fields do not match
|
||||
</p>
|
||||
<ul className="list-disc list-inside p-2">
|
||||
{res.mismatch_fields?.map((field) => (
|
||||
<li key={field}>{field}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
),
|
||||
closeButton: true,
|
||||
duration: 10000,
|
||||
});
|
||||
setDisabled(false);
|
||||
}}
|
||||
>
|
||||
|
Reference in New Issue
Block a user