3.3 KiB
3.3 KiB
Task D.5.5.1: Force Rename Enquiry Domain Opportunity
Objective
Rename the sales execution domain from Enquiry to Opportunity across active application code for the development-only reset phase of D.5.5.1.
Review Completed
AGENTS.mdplans/task-d.5.5.1.mdplans/task-d.5.5.mddocs/adr/0018-lead-enquiry-domain-separation.mddocs/implementation/task-d55-opportunity-sales-workspace-refinement.mddocs/security/crm-authorization-boundaries.mdsrc/db/schema.tssrc/config/nav-config.ts- current CRM route and feature structure
What Changed
- Renamed active CRM feature module from
src/features/crm/enquiriesto: - Renamed API route base from
src/app/api/crm/enquiriesto: - Renamed dashboard route base from
src/app/dashboard/crm/enquiriesto: - Renamed opportunity-facing component files, including:
opportunity-detail.tsxopportunities-table.tsxopportunity-form-sheet.tsxopportunity-followups-tab.tsxopportunity-assignment-dialog.tsxopportunity-outcome-card.tsxopportunity-status-badge.tsx
- Renamed schema file:
opportunity.schema.ts
- Replaced active application imports, symbols, route strings, and permission identifiers in
src/fromenquiryterminology toopportunityterminology. - Updated active CRM permission namespace usage in code from
crmEnquiry*tocrmOpportunity*. - Updated active sales route URLs from
/dashboard/crm/enquiriesto/dashboard/crm/opportunities. - Updated active API URLs from
/api/crm/enquiriesto/api/crm/opportunities. - Renamed active report routes from
/dashboard/crm/reports/enquiry-agingand/api/crm/reports/enquiry-agingto/dashboard/crm/reports/opportunity-agingand/api/crm/reports/opportunity-aging. - Updated active governance references in project foundations, UI/UX rules, and CRM access inventory to point at the
opportunitydomain. - Fixed the corrupted Thai branch label in
src/db/seeds/foundation.seed.tsand normalized touched config/seed files to UTF-8.
Key Rename Direction
Enquiry->Opportunityenquiry->opportunitycrm_enquiries->crm_opportunitiescrm_enquiry->crm_opportunitycrm.enquiry.*->crm.opportunity.*
Development Reset Implication
This task is implemented under the development-only breaking-change assumption from the task contract:
- database reset is expected
- migration history compatibility is not preserved
- seed/config/document-sequence data must be regenerated around the new opportunity domain
Verification
npm exec tsc --noEmit
Known Follow-up Areas
- Historical docs under
docs/**still contain legacy enquiry references where they describe earlier phases or legacy architecture. - Database reset, migration regeneration, and seed verification still need to be executed explicitly in the development environment before treating the rename as operationally complete.