density
This commit is contained in:
@@ -55,11 +55,11 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
}, [config.collectionLabel, entity, lifecycleFilter, operationalFilter, searchTerm, stateFilter, statusFilter, token]);
|
||||
|
||||
return (
|
||||
<section className="rounded-[28px] border border-line/70 bg-surface/90 p-8 shadow-panel">
|
||||
<section className="rounded-[28px] border border-line/70 bg-surface/90 p-6 shadow-panel">
|
||||
<div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.24em] text-muted">CRM</p>
|
||||
<h3 className="mt-3 text-2xl font-bold text-text">{config.collectionLabel}</h3>
|
||||
<h3 className="mt-3 text-xl font-bold text-text">{config.collectionLabel}</h3>
|
||||
<p className="mt-2 max-w-2xl text-sm text-muted">
|
||||
Operational contact records, shipping addresses, and account context for active {config.collectionLabel.toLowerCase()}.
|
||||
</p>
|
||||
@@ -67,7 +67,7 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
{canManage ? (
|
||||
<Link
|
||||
to={`${config.routeBase}/new`}
|
||||
className="inline-flex items-center justify-center rounded-2xl bg-brand px-5 py-3 text-sm font-semibold text-white"
|
||||
className="inline-flex items-center justify-center rounded-2xl bg-brand px-3 py-2 text-sm font-semibold text-white"
|
||||
>
|
||||
New {config.singularLabel.toLowerCase()}
|
||||
</Link>
|
||||
@@ -137,9 +137,9 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-4 py-3 text-sm text-muted">{status}</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-2 py-2 text-sm text-muted">{status}</div>
|
||||
{records.length === 0 ? (
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-6 py-12 text-center text-sm text-muted">
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-4 py-8 text-center text-sm text-muted">
|
||||
{config.emptyMessage}
|
||||
</div>
|
||||
) : (
|
||||
@@ -147,19 +147,19 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
<table className="min-w-full divide-y divide-line/70 text-sm">
|
||||
<thead className="bg-page/80 text-left text-muted">
|
||||
<tr>
|
||||
<th className="px-4 py-3">Name</th>
|
||||
<th className="px-4 py-3">Status</th>
|
||||
<th className="px-4 py-3">Lifecycle</th>
|
||||
<th className="px-4 py-3">Operational</th>
|
||||
<th className="px-4 py-3">Activity</th>
|
||||
<th className="px-4 py-3">Contact</th>
|
||||
<th className="px-4 py-3">Updated</th>
|
||||
<th className="px-2 py-2">Name</th>
|
||||
<th className="px-2 py-2">Status</th>
|
||||
<th className="px-2 py-2">Lifecycle</th>
|
||||
<th className="px-2 py-2">Operational</th>
|
||||
<th className="px-2 py-2">Activity</th>
|
||||
<th className="px-2 py-2">Contact</th>
|
||||
<th className="px-2 py-2">Updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-line/70 bg-surface">
|
||||
{records.map((record) => (
|
||||
<tr key={record.id} className="transition hover:bg-page/70">
|
||||
<td className="px-4 py-3 font-semibold text-text">
|
||||
<td className="px-2 py-2 font-semibold text-text">
|
||||
<Link to={`${config.routeBase}/${record.id}`} className="hover:text-brand">
|
||||
{record.name}
|
||||
</Link>
|
||||
@@ -170,13 +170,13 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
</div>
|
||||
) : null}
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<td className="px-2 py-2">
|
||||
<CrmStatusBadge status={record.status} />
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">
|
||||
<td className="px-2 py-2 text-muted">
|
||||
{record.lifecycleStage ? <CrmLifecycleBadge stage={record.lifecycleStage} /> : null}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-xs text-muted">
|
||||
<td className="px-2 py-2 text-xs text-muted">
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{record.preferredAccount ? <span className="rounded-full border border-line/70 px-2 py-1">Preferred</span> : null}
|
||||
{record.strategicAccount ? <span className="rounded-full border border-line/70 px-2 py-1">Strategic</span> : null}
|
||||
@@ -187,19 +187,19 @@ export function CrmListPage({ entity }: CrmListPageProps) {
|
||||
) : null}
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-xs text-muted">
|
||||
<td className="px-2 py-2 text-xs text-muted">
|
||||
<div>{record.rollups?.contactHistoryCount ?? 0} timeline entries</div>
|
||||
<div>{record.rollups?.attachmentCount ?? 0} attachments</div>
|
||||
{entity === "customer" ? <div>{record.rollups?.childCustomerCount ?? 0} child accounts</div> : null}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">
|
||||
<td className="px-2 py-2 text-muted">
|
||||
<div>{record.email}</div>
|
||||
<div className="mt-1 text-xs">
|
||||
{record.city}, {record.state}, {record.country}
|
||||
</div>
|
||||
<div className="mt-1 text-xs">{record.phone}</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">{new Date(record.updatedAt).toLocaleDateString()}</td>
|
||||
<td className="px-2 py-2 text-muted">{new Date(record.updatedAt).toLocaleDateString()}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user