This commit is contained in:
phaichayon
2026-07-01 08:44:35 +07:00
parent 0c39472dca
commit 6d6cd3a6df
32 changed files with 1284 additions and 333 deletions

View File

@@ -1,7 +1,7 @@
{
"generatedAt": "2026-06-30T16:18:57.428Z",
"generatedAt": "2026-06-30T23:54:26.582Z",
"overallStatus": "PASS",
"quotationCode": "CRA2606-1108",
"quotationCode": "CRA2606-1107",
"expectedFixtureCode": "QT-H5-AUDIT",
"template": {
"templateName": "ALLA Demo Quotation Standard",
@@ -263,7 +263,7 @@
"consistency": {
"status": "PASS",
"approvedSnapshotAvailable": true,
"approvedArtifactReference": null,
"approvedArtifactReference": "artifact:7088f4e9-c56a-4389-975b-3c7ccf13c772",
"inconsistentKeys": []
},
"integritySummary": {

View File

@@ -1,8 +1,8 @@
# PDF Audit Report
- Generated At: 2026-06-30T16:18:57.428Z
- Generated At: 2026-06-30T23:54:26.582Z
- Overall Status: PASS
- Quotation Code: CRA2606-1108
- Quotation Code: CRA2606-1107
- Template: ALLA Demo Quotation Standard v1.0
- Previous Version: None

View File

@@ -0,0 +1,38 @@
# Task D.6 Implementation Report - 2026-07-01
## Scope
- Separate CRM business `Activity` semantics from system-generated audit history.
- Rename CRM detail tabs that currently show system history from `Activity` to `Audit Log`.
- Improve follow-up date input UX with the shared calendar picker and stable `YYYY-MM-DD` display.
- Introduce a contract-first CRM Activity foundation without migrating existing follow-up storage in this phase.
## Review Summary
Reviewed before implementation:
- [AGENTS.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/AGENTS.md)
- [plans/task-d.6.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/plans/task-d.6.md)
- [docs/standards/project-foundations.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/docs/standards/project-foundations.md)
- [docs/standards/architecture-rules.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/docs/standards/architecture-rules.md)
- [docs/standards/ui-ux-rules.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/docs/standards/ui-ux-rules.md)
- [docs/standards/task-review-checklist.md](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/docs/standards/task-review-checklist.md)
- Related CRM detail, follow-up, and audit-log foundations under `src/features/crm/**` and `src/features/foundation/audit-log/**`
## Changes
- Added shared [audit-log-tab.tsx](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/features/crm/components/audit-log-tab.tsx) and [types.ts](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/features/crm/audit-log/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`, and `requestId`.
- Standardized [crm-form-controls.tsx](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/features/crm/components/crm-form-controls.tsx) and [date-picker-field.tsx](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/components/forms/fields/date-picker-field.tsx) to show `YYYY-MM-DD` and allow clearing optional dates.
- Rebuilt [lead-followup-panel.tsx](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/features/crm/leads/components/lead-followup-panel.tsx) to use the shared date-picker field instead of plain text date entry.
- Added [src/features/crm/activity/types.ts](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/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](/C:/Users/mtpphtaps/Documents/gitea/alla-allaos-fullstack/src/lib/auth/rbac.ts).
## Verification
- `npm run typecheck` -> PASS
- `npm run build` -> PASS
- `npm 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 build` still 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.