feat(post-audit): batch A+B quick-wins + audit-side residuals
Bundles the user-prioritised follow-ups from the post-audit punch-list.
Batch A — pipeline + EOI safety:
- §1.1 timeline buildAuditDescription renders diff fields ("leadCategory → hot_lead").
- §4.13 EOI rejection cascade: notification to assigned rep + audit row + rose banner.
- §4.10b finish doc-detail: SigningProgress reuse, linked-entity names (server-resolved),
per-event icons + tooltips + show-more in activity panel.
- §7.2 stage guidance card replaces empty Payments slot pre-reservation.
- §4.15 deal-pulse trigger audit (docs/deal-pulse-trigger-audit.md).
Batch B — UX consistency + docs:
- §1.4 quick log-contact button on interest header.
- §2.1 contact-log compose: Dialog → Sheet.
- §7.1 docs/deal-pulse explainer page; /docs/ in PUBLIC_PATHS.
- DocumentStatus now includes 'rejected' + 'declined' across constants, labels, tone maps.
Audit-side residuals:
- M-NEW-1 /me/ports skips port-context requirement.
- M-AU03 audit log CSV export endpoint + UI button.
- M-IN03 dead receipt-scanner.ts deleted; live path already per-port.
- M-P01 pg_trgm GIN indexes (migration 0071).
- §10.1 webhook tests verified passing (was stale).
Deferred per user direction:
- §11.3 email copy refactor (needs old-CRM reference).
- M-EM03 IMAP bounce-to-interest linking.
Tests: 1374/1374. tsc + lint clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useEffect, useState, useCallback, useMemo } from 'react';
|
||||
import { type ColumnDef } from '@tanstack/react-table';
|
||||
import { formatDistanceToNow } from 'date-fns';
|
||||
import { History, Search, X } from 'lucide-react';
|
||||
import { Download, History, Search, X } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { DataTable } from '@/components/shared/data-table';
|
||||
@@ -548,8 +548,31 @@ export function AuditLogList() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* M-AU03: CSV export inherits the current filter set. The
|
||||
endpoint streams up to 10 000 rows; reps wanting deeper
|
||||
history narrow the filter first. */}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="ml-auto"
|
||||
onClick={() => {
|
||||
const url = new URL('/api/v1/admin/audit/export', window.location.origin);
|
||||
if (debouncedSearch) url.searchParams.set('q', debouncedSearch);
|
||||
if (entityType !== 'all') url.searchParams.set('entityType', entityType);
|
||||
if (action !== 'all') url.searchParams.set('action', action);
|
||||
if (severity !== 'all') url.searchParams.set('severity', severity);
|
||||
if (source !== 'all') url.searchParams.set('source', source);
|
||||
if (userId) url.searchParams.set('userId', userId);
|
||||
if (dateFrom) url.searchParams.set('from', dateFrom);
|
||||
if (dateTo) url.searchParams.set('to', dateTo);
|
||||
window.location.href = url.toString();
|
||||
}}
|
||||
>
|
||||
<Download className="mr-1.5 h-3 w-3" aria-hidden />
|
||||
Export CSV
|
||||
</Button>
|
||||
{hasActiveFilter ? (
|
||||
<Button variant="ghost" size="sm" onClick={clearFilters} className="ml-auto">
|
||||
<Button variant="ghost" size="sm" onClick={clearFilters}>
|
||||
<X className="mr-1.5 h-3 w-3" />
|
||||
Clear
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user