5.7 KiB
5.7 KiB
Task P.7.2.1 Implementation Report - 2026-07-01
Scope
- Apply the UX amendment that separates quotation documents into
Working Documents,Official Documents, andCustomer Package. - Remove screen-level emphasis on technical wording such as draft-style PDF terminology.
- Enforce the business rule that customer package assembly must use the approved PDF, not a working quotation render.
Review Summary
Reviewed before implementation:
- AGENTS.md
- docs/standards/project-foundations.md
- docs/standards/architecture-rules.md
- docs/standards/ui-ux-rules.md
- docs/standards/task-review-checklist.md
- docs/business/crm-terminology.md
- plans/task-p.7.2.1.md
- docs/implementation/task-p.7-implementation.md
- docs/implementation/task-p.7.1.1-customer-package-ui-integration-2026-06-30.md
Skills used this round:
kiranism-shadcn-dashboardfor quotation detail page and feature-module conventionsshadcnfor card/tabs/button/dialog composition checksweb-design-guidelinesfor post-change UI review against the Vercel guideline source
Foundations reused:
- quotation detail page shell in quotation-detail.tsx
- quotation preview foundation in quotation-document-preview.tsx
- approved PDF storage/retrieval in pdf-generator service
- document assembly foundation in document-assembly service
Implementation
- Refactored quotation detail UI in quotation-detail.tsx to add:
DocumentstabCustomer PackagetabWorking Documentssection withGenerateandPreviewactionsOfficial Documentssection withPreviewandDownloadactionsCustomer Packagesection withGenerate Package,Preview Package,Download Package, and disabledSend Package
- Removed screen-level actions that promoted the old flat document UX, including the previous top-of-page customer package card and the old standalone
Document Previewtab label. - Kept the detailed package metadata view in a dedicated
Customer Packagetab for status, warnings, included documents, checksum, and generation metadata. - Added approved-PDF download helper in quotation api service so the UI can provide an explicit
Downloadaction for official documents. - Updated customer-package helper and tests to:
- relabel
mainsource asApproved PDF - map missing-approved-PDF failures to business-readable copy
- keep permission and missing-document messages readable
- relabel
- Updated document assembly service so the main package source now comes from
getStoredApprovedQuotationPdf()instead of live working-document generation.
Business Rule Change
- Customer package assembly now uses:
- approved PDF artifact
- active document library appendices
- Customer package assembly no longer uses:
- live working quotation PDF generation
- preview/runtime-only working output
This aligns the package with the task requirement that customer-deliverable content must be assembled from approved, auditable documents only.
Verification
npm exec tsc --noEmit-> PASSnode --import tsx --test src/features/crm/quotations/customer-package.test.ts-> PASSnpm run build-> PASS
Web Review
Reviewed the updated quotation detail document surface against the fetched Vercel Web Interface Guidelines source.
Result:
- No blocking accessibility or interaction regressions found in the new
DocumentsandCustomer Packagesections. - Buttons remain text-labeled, destructive actions still use confirmation, and preview/download actions use links or explicit button handlers appropriately.
Known Follow-up
- I did not add URL-deep-link sync for the new tabs in this round; the page still follows the repo's existing local tab-state pattern.
Outcome
Task P.7.2.1 now presents quotation documents in the intended business hierarchy and makes customer package generation semantically depend on the approved document lifecycle, not on working previews.