3.6 KiB
3.6 KiB
Task D.6 Implementation Report - 2026-07-01
Scope
- Separate CRM business
Activitysemantics from system-generated audit history. - Rename CRM detail tabs that currently show system history from
ActivitytoAudit Log. - Improve follow-up date input UX with the shared calendar picker and stable
YYYY-MM-DDdisplay. - Introduce a contract-first CRM Activity foundation without migrating existing follow-up storage in this phase.
Review Summary
Reviewed before implementation:
- AGENTS.md
- plans/task-d.6.md
- docs/standards/project-foundations.md
- docs/standards/architecture-rules.md
- docs/standards/ui-ux-rules.md
- docs/standards/task-review-checklist.md
- Related CRM detail, follow-up, and audit-log foundations under
src/features/crm/**andsrc/features/foundation/audit-log/**
Changes
- Added shared audit-log-tab.tsx and types.ts for consistent CRM audit history rendering.
- Updated lead, opportunity, customer, and quotation detail views to label system history as
Audit Log. - Enriched CRM audit-log records in lead, opportunity, customer, and quotation services so UI can consume
beforeData,afterData, andrequestId. - Standardized crm-form-controls.tsx and date-picker-field.tsx to show
YYYY-MM-DDand allow clearing optional dates. - Rebuilt lead-followup-panel.tsx to use the shared date-picker field instead of plain text date entry.
- Added src/features/crm/activity/types.ts to define future activity entity scope, types, statuses, priorities, permission contracts, and overdue-status derivation.
- Added activity and audit-log permission keys in rbac.ts.
Verification
npm run typecheck-> PASSnpm run build-> PASSnpm run audit:pdf-> PASS
Known Follow-up
- Historical lead/opportunity/quotation follow-up rows still live in their existing tables and APIs; only the UX and activity contracts were prepared in this phase.
npm run buildstill emits pre-existing Turbopack warnings about workspace root lockfile detection and NFT tracing around PDF audit/template validation paths. No new blocking build issue was introduced by D.6.
Outcome
Task D.6 now reserves Activity for future MK/Sales business work, presents current system history as Audit Log, improves lead follow-up date entry with a proper calendar picker, and establishes the first reusable contracts for a future CRM activity module.