make the send estimate modal more beautifull and informative, also besid
This commit is contained in:
@@ -39,13 +39,14 @@ export default function LeadsPage() {
|
||||
}, []);
|
||||
|
||||
const handleExportCsv = () => {
|
||||
const headers = ['Name', 'Email', 'Date Submitted'];
|
||||
const headers = ['Name', 'Email', 'Phone', 'Date Submitted'];
|
||||
const csvContent = [
|
||||
headers.join(','),
|
||||
...leads.map(lead =>
|
||||
[
|
||||
`"${lead.name}"`,
|
||||
`"${lead.email}"`,
|
||||
`"${lead.phone || ''}"`,
|
||||
`"${format(new Date(lead.createdAt), 'PPP p')}"`
|
||||
].join(',')
|
||||
)
|
||||
@@ -85,6 +86,7 @@ export default function LeadsPage() {
|
||||
<TableRow>
|
||||
<TableHead>Name</TableHead>
|
||||
<TableHead>Email</TableHead>
|
||||
<TableHead>Phone</TableHead>
|
||||
<TableHead className="text-right">Date Submitted</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
@@ -95,6 +97,7 @@ export default function LeadsPage() {
|
||||
<TableRow key={i}>
|
||||
<TableCell><Skeleton className="h-5 w-24" /></TableCell>
|
||||
<TableCell><Skeleton className="h-5 w-40" /></TableCell>
|
||||
<TableCell><Skeleton className="h-5 w-32" /></TableCell>
|
||||
<TableCell className="text-right"><Skeleton className="h-5 w-32 ml-auto" /></TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
@@ -104,6 +107,7 @@ export default function LeadsPage() {
|
||||
<TableRow key={lead.id}>
|
||||
<TableCell className="font-medium">{lead.name}</TableCell>
|
||||
<TableCell>{lead.email}</TableCell>
|
||||
<TableCell>{lead.phone || 'N/A'}</TableCell>
|
||||
<TableCell className="text-right">
|
||||
{format(new Date(lead.createdAt), 'PPP p')}
|
||||
</TableCell>
|
||||
@@ -111,7 +115,7 @@ export default function LeadsPage() {
|
||||
))
|
||||
) : (
|
||||
<TableRow>
|
||||
<TableCell colSpan={3} className="text-center h-24">
|
||||
<TableCell colSpan={4} className="text-center h-24">
|
||||
No leads yet.
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user