mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 18:21:32 +10:00
chore: made requested changes
Signed-off-by: Adithya Krishna <adikrish@redhat.com>
This commit is contained in:
@ -34,23 +34,22 @@ export default async function DashboardPage() {
|
||||
}),
|
||||
]);
|
||||
|
||||
const cardData = [
|
||||
{ icon: FileCheck, title: 'Completed', status: stats.COMPLETED },
|
||||
{ icon: File, title: 'Drafts', status: stats.DRAFT },
|
||||
{ icon: Clock, title: 'Pending', status: stats.PENDING },
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full max-w-screen-xl px-4 md:px-8">
|
||||
<h1 className="text-4xl font-semibold">Dashboard</h1>
|
||||
|
||||
<div className="mt-8 grid grid-cols-1 gap-4 md:grid-cols-3">
|
||||
{cardData.map((card) => (
|
||||
<Link key={card.status} href={`/documents?status=${card.status}`} passHref>
|
||||
<CardMetric icon={card.icon} title={card.title} value={card.status} />
|
||||
</Link>
|
||||
))}
|
||||
<Link href={'/documents?status=COMPLETED'} passHref>
|
||||
<CardMetric icon={FileCheck} title="Completed" value={stats.COMPLETED} />
|
||||
</Link>
|
||||
<Link href={'/documents?status=DRAFT'} passHref>
|
||||
<CardMetric icon={File} title="Drafts" value={stats.DRAFT} />
|
||||
</Link>
|
||||
<Link href={'/documents?status=PENDING'} passHref>
|
||||
<CardMetric icon={Clock} title="Pending" value={stats.PENDING} />
|
||||
</Link>
|
||||
</div>
|
||||
;
|
||||
|
||||
<div className="mt-12">
|
||||
<UploadDocument />
|
||||
|
||||
|
||||
@ -82,17 +82,13 @@ export const DateField = ({ field, recipient }: DateFieldProps) => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p
|
||||
className={`
|
||||
${
|
||||
!field.inserted
|
||||
? 'group-hover:text-primary text-muted-foreground text-lg duration-200'
|
||||
: 'text-muted-foreground text-sm duration-200'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{field.inserted ? field.customText : 'Date'}
|
||||
</p>
|
||||
{!field.inserted && (
|
||||
<p className="group-hover:text-primary text-muted-foreground text-lg duration-200">Date</p>
|
||||
)}
|
||||
|
||||
{field.inserted && (
|
||||
<p className="text-muted-foreground text-sm duration-200">{field.customText}</p>
|
||||
)}
|
||||
</SigningFieldContainer>
|
||||
);
|
||||
};
|
||||
|
||||
@ -60,16 +60,18 @@ export const SigningFieldContainer = ({
|
||||
'text-foreground hover:shadow-primary-foreground group flex h-full w-full flex-col items-center justify-center p-2',
|
||||
)}
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
className={`
|
||||
absolute inset-0 z-10 ${field.inserted ? 'text-destructive bg-background/40' : ''}
|
||||
`}
|
||||
onClick={field.inserted ? onRemoveSignedFieldClick : onSignFieldClick}
|
||||
disabled={loading}
|
||||
>
|
||||
{field.inserted ? 'Remove' : ''}
|
||||
</button>
|
||||
{!field.inserted && !loading && (
|
||||
<button type="submit" className="absolute inset-0 z-10" onClick={onSignFieldClick} />
|
||||
)}
|
||||
|
||||
{field.inserted && !loading && (
|
||||
<button
|
||||
className="text-destructive bg-background/40 absolute inset-0 z-10 flex items-center justify-center rounded-md text-sm opacity-0 backdrop-blur-sm duration-200 group-hover:opacity-100"
|
||||
onClick={onRemoveSignedFieldClick}
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
)}
|
||||
{children}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user